summary refs log tree commit diff
path: root/nixos/modules/services/x11/window-managers/fvwm.nix
blob: 9a51b9cd6602afe66af70320b532f6754601fba6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ config, lib, pkgs, ... }:

with lib;

let
  cfg = config.services.xserver.windowManager.fvwm;
  fvwm = pkgs.fvwm.override { gestures = cfg.gestures; };
in

{

  ###### interface

  options = {
    services.xserver.windowManager.fvwm = {
      enable = mkEnableOption "Fvwm window manager";

      gestures = mkOption {
        default = false;
        type = types.bool;
        description = "Whether or not to enable libstroke for gesture support";
      };
    };
  };


  ###### implementation

  config = mkIf cfg.enable {
    services.xserver.windowManager.session = singleton
      { name = "fvwm";
        start =
          ''
            ${fvwm}/bin/fvwm &
            waitPID=$!
          '';
      };

    environment.systemPackages = [ fvwm ];
  };
}