about summary refs log tree commit diff
path: root/nixos/modules/services/x11
diff options
context:
space:
mode:
authorJosé Romildo Malaquias <malaquias@gmail.com>2016-03-07 11:21:53 -0300
committerJosé Romildo Malaquias <malaquias@gmail.com>2016-03-07 16:07:13 -0300
commit82e12688a2cd00fdc1f3d134decb52942ced8f1d (patch)
tree868ae06b1ebc175c0248073488908970db08ecb4 /nixos/modules/services/x11
parent48a9555bc078cf2cfffedb5a557cc88f195d64a7 (diff)
jwm: window manager module addition
Diffstat (limited to 'nixos/modules/services/x11')
-rw-r--r--nixos/modules/services/x11/window-managers/default.nix1
-rw-r--r--nixos/modules/services/x11/window-managers/jwm.nix25
2 files changed, 26 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/window-managers/default.nix b/nixos/modules/services/x11/window-managers/default.nix
index 26dfbb1f4e18d..63136beac7100 100644
--- a/nixos/modules/services/x11/window-managers/default.nix
+++ b/nixos/modules/services/x11/window-managers/default.nix
@@ -17,6 +17,7 @@ in
     ./fluxbox.nix
     ./herbstluftwm.nix
     ./i3.nix
+    ./jwm.nix
     ./metacity.nix
     ./openbox.nix
     ./notion.nix
diff --git a/nixos/modules/services/x11/window-managers/jwm.nix b/nixos/modules/services/x11/window-managers/jwm.nix
new file mode 100644
index 0000000000000..0e8dab2e9224d
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/jwm.nix
@@ -0,0 +1,25 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.services.xserver.windowManager.jwm;
+in
+{
+  ###### interface
+  options = {
+    services.xserver.windowManager.jwm.enable = mkEnableOption "jwm";
+  };
+
+  ###### implementation
+  config = mkIf cfg.enable {
+    services.xserver.windowManager.session = singleton {
+      name = "jwm";
+      start = ''
+        ${pkgs.jwm}/bin/jwm &
+        waitPID=$!
+      '';
+    };
+    environment.systemPackages = [ pkgs.jwm ];
+  };
+}