summary refs log tree commit diff
diff options
context:
space:
mode:
authorEvan Danaher <github@edanaher.net>2017-04-05 11:12:46 -0400
committerEvan Danaher <github@edanaher.net>2017-04-05 11:12:46 -0400
commit7a38b0858fbed43e80f84a91da821eaaf657c5d7 (patch)
tree61cbe6ea4b3acde2385dd0651e43c9449275df7c
parent65593e64c480493555ae21050a422e4c7ff9c7ea (diff)
downloadnixpkgs-7a38b0858fbed43e80f84a91da821eaaf657c5d7.tar
nixpkgs-7a38b0858fbed43e80f84a91da821eaaf657c5d7.tar.gz
nixpkgs-7a38b0858fbed43e80f84a91da821eaaf657c5d7.tar.bz2
nixpkgs-7a38b0858fbed43e80f84a91da821eaaf657c5d7.tar.lz
nixpkgs-7a38b0858fbed43e80f84a91da821eaaf657c5d7.tar.xz
nixpkgs-7a38b0858fbed43e80f84a91da821eaaf657c5d7.tar.zst
nixpkgs-7a38b0858fbed43e80f84a91da821eaaf657c5d7.zip
fvwm module: init; now fvwm can be used as an xserver.windowManager
-rw-r--r--nixos/modules/services/x11/window-managers/default.nix1
-rw-r--r--nixos/modules/services/x11/window-managers/fvwm.nix41
2 files changed, 42 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/window-managers/default.nix b/nixos/modules/services/x11/window-managers/default.nix
index f005decfa33..6d30fd3f4d6 100644
--- a/nixos/modules/services/x11/window-managers/default.nix
+++ b/nixos/modules/services/x11/window-managers/default.nix
@@ -14,6 +14,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 00000000000..9a51b9cd660
--- /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 ];
+  };
+}