summary refs log tree commit diff
path: root/modules/services/x11/desktop-managers/xterm.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-09-04 13:05:09 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-09-04 13:05:09 +0200
commit17457297cb05461696cfc36844b88294bd38222d (patch)
tree295571acc18df41615e1b9c330260a3af3ae1de5 /modules/services/x11/desktop-managers/xterm.nix
parent3a23e6dd31d39d0a8ea229661d29855361c143cb (diff)
downloadnixpkgs-17457297cb05461696cfc36844b88294bd38222d.tar
nixpkgs-17457297cb05461696cfc36844b88294bd38222d.tar.gz
nixpkgs-17457297cb05461696cfc36844b88294bd38222d.tar.bz2
nixpkgs-17457297cb05461696cfc36844b88294bd38222d.tar.lz
nixpkgs-17457297cb05461696cfc36844b88294bd38222d.tar.xz
nixpkgs-17457297cb05461696cfc36844b88294bd38222d.tar.zst
nixpkgs-17457297cb05461696cfc36844b88294bd38222d.zip
Update all legacy-style modules
I.e., modules that use "require = [options]".  Nowadays that should be
written as

  {
    options = { ... };
    config = { ... };
  };

Also, use "imports" instead of "require" in places where we actually
import another module.
Diffstat (limited to 'modules/services/x11/desktop-managers/xterm.nix')
-rw-r--r--modules/services/x11/desktop-managers/xterm.nix38
1 files changed, 15 insertions, 23 deletions
diff --git a/modules/services/x11/desktop-managers/xterm.nix b/modules/services/x11/desktop-managers/xterm.nix
index 7aa70269dc4..edc61c103ea 100644
--- a/modules/services/x11/desktop-managers/xterm.nix
+++ b/modules/services/x11/desktop-managers/xterm.nix
@@ -1,10 +1,14 @@
-{pkgs, config, ...}:
+{ config, pkgs, ... }:
+
+with pkgs.lib;
 
 let
 
-  inherit (pkgs.lib) mkOption mkIf;
   cfg = config.services.xserver.desktopManager.xterm;
 
+in
+
+{
   options = {
 
     services.xserver.desktopManager.xterm.enable = mkOption {
@@ -15,30 +19,18 @@ let
 
   };
 
-in
-
-mkIf cfg.enable {
-  require = options;
+  config = mkIf cfg.enable {
 
-  services = {
-    xserver = {
-
-      desktopManager = {
-        session = [{
-          name = "xterm";
-          start = ''
-            ${pkgs.xterm}/bin/xterm -ls &
-            waitPID=$!
-          '';
-        }];
+    services.xserver.desktopManager.session = singleton
+      { name = "xterm";
+        start = ''
+          ${pkgs.xterm}/bin/xterm -ls &
+          waitPID=$!
+        '';
       };
 
-    };
-  };
+    environment.systemPackages = [ pkgs.xterm ];
 
-  environment = {
-    x11Packages = [
-      pkgs.xterm
-    ];
   };
+
 }