diff --git a/nixos/modules/services/x11/window-managers/default.nix b/nixos/modules/services/x11/window-managers/default.nix index 42785b251587..32ef34bdad2b 100644 --- a/nixos/modules/services/x11/window-managers/default.nix +++ b/nixos/modules/services/x11/window-managers/default.nix @@ -15,6 +15,7 @@ in ./dwm.nix ./exwm.nix ./fluxbox.nix + ./fvwm.nix ./herbstluftwm.nix ./i3.nix ./jwm.nix diff --git a/nixos/modules/services/x11/window-managers/fvwm.nix b/nixos/modules/services/x11/window-managers/fvwm.nix new file mode 100644 index 000000000000..9a51b9cd6602 --- /dev/null +++ b/nixos/modules/services/x11/window-managers/fvwm.nix @@ -0,0 +1,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 ]; + }; +}