summary refs log tree commit diff
path: root/modules/services/x11/window-managers/twm.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2010-01-05 15:30:56 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2010-01-05 15:30:56 +0000
commit62476f2816aeeadf1fff657a6949eaafbac6df6e (patch)
tree4da0b899592a0ef9ffdf178da74d0f6e062031ef /modules/services/x11/window-managers/twm.nix
parentbc8445a89e54f61489bed928384474a2acd00b0a (diff)
downloadnixpkgs-62476f2816aeeadf1fff657a6949eaafbac6df6e.tar
nixpkgs-62476f2816aeeadf1fff657a6949eaafbac6df6e.tar.gz
nixpkgs-62476f2816aeeadf1fff657a6949eaafbac6df6e.tar.bz2
nixpkgs-62476f2816aeeadf1fff657a6949eaafbac6df6e.tar.lz
nixpkgs-62476f2816aeeadf1fff657a6949eaafbac6df6e.tar.xz
nixpkgs-62476f2816aeeadf1fff657a6949eaafbac6df6e.tar.zst
nixpkgs-62476f2816aeeadf1fff657a6949eaafbac6df6e.zip
* Added a module for IceWM.
svn path=/nixos/trunk/; revision=19238
Diffstat (limited to 'modules/services/x11/window-managers/twm.nix')
-rw-r--r--modules/services/x11/window-managers/twm.nix52
1 files changed, 25 insertions, 27 deletions
diff --git a/modules/services/x11/window-managers/twm.nix b/modules/services/x11/window-managers/twm.nix
index 6b67934feb7..3c4780386ce 100644
--- a/modules/services/x11/window-managers/twm.nix
+++ b/modules/services/x11/window-managers/twm.nix
@@ -1,44 +1,42 @@
-{pkgs, config, ...}:
+{ config, pkgs, ... }:
+
+with pkgs.lib;
 
 let
-  inherit (pkgs.lib) mkOption mkIf;
+
   cfg = config.services.xserver.windowManager.twm;
-  xorg = pkgs.xorg;
 
-  option = { services = { xserver = { windowManager = {
+in
 
-    twm = {
-      enable = mkOption {
-        default = false;
-        example = true;
-        description = "Enable the twm window manager.";
-      };
+{
+
+  ###### interface
 
+  options = {
+  
+    services.xserver.windowManager.twm.enable = mkOption {
+      default = false;
+      description = "Enable the twm window manager.";
     };
 
-  }; }; }; };
-in
+  };
+
 
-mkIf cfg.enable {
-  require = option;
+  ###### implementation
 
-  services = {
-    xserver = {
+  config = mkIf cfg.enable {
 
-      windowManager = {
-        session = [{
-          name = "twm";
-          start = "
-            ${xorg.twm}/bin/twm &
+    services.xserver.windowManager.session = singleton
+      { name = "twm";
+        start =
+          ''
+            ${pkgs.xorg.twm}/bin/twm &
             waitPID=$!
-          ";
-        }];
+          '';
       };
 
-    };
+    environment.x11Packages = [ pkgs.xorg.twm ];
+    
   };
 
-  environment = {
-    x11Packages = [ xorg.twm ];
-  };
 }