about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorWilliam Casarin2015-03-15 20:24:54 -0700
committerWilliam Casarin2015-03-21 11:02:44 -0700
commitea2baa8abfc44ae3b32ec424cd81d035225ae100 (patch)
tree60de60d5d3f69596403153c23970dee26761ab36 /nixos/modules
parent045164638217b8ce2492019db38fdeb4a508d6a3 (diff)
spectrwm window manager
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/x11/window-managers/default.nix1
-rw-r--r--nixos/modules/services/x11/window-managers/spectrwm.nix33
2 files changed, 34 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/window-managers/default.nix b/nixos/modules/services/x11/window-managers/default.nix
index 97cc198137c4..1912b8aa5a91 100644
--- a/nixos/modules/services/x11/window-managers/default.nix
+++ b/nixos/modules/services/x11/window-managers/default.nix
@@ -18,6 +18,7 @@ in
     ./openbox.nix
     ./sawfish.nix
     ./stumpwm.nix
+    ./spectrwm.nix
     ./twm.nix
     ./windowmaker.nix
     ./wmii.nix
diff --git a/nixos/modules/services/x11/window-managers/spectrwm.nix b/nixos/modules/services/x11/window-managers/spectrwm.nix
new file mode 100644
index 000000000000..5db6b41ba8fd
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/spectrwm.nix
@@ -0,0 +1,33 @@
+
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.services.xserver.windowManager.spectrwm;
+in
+
+{
+  options = {
+    services.xserver.windowManager.spectrwm = {
+      enable = mkOption {
+        default = false;
+        example = true;
+        description = "Enable the spectrwm window manager.";
+      };
+    };
+  };
+
+  config = mkIf cfg.enable {
+    services.xserver.windowManager = {
+      session = [{
+        name = "spectrwm";
+        start = ''
+          ${pkgs.spectrwm}/bin/spectrwm &
+          waitPID=$!
+        '';
+      }];
+    };
+    environment.systemPackages = [ pkgs.spectrwm ];
+  };
+}