summary refs log tree commit diff
path: root/nixos/modules/system/boot/systemd.nix
diff options
context:
space:
mode:
authorPaul Colomiets <paul@colomiets.name>2014-06-20 21:34:21 +0300
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-06-20 17:41:14 -0400
commit11e25f1a3e89b9c54778c178f9b113e4b44ac111 (patch)
tree735452cf5cb5cf467c0b3a04b6ffc69d08dc04ec /nixos/modules/system/boot/systemd.nix
parent4d0d8916446584c8588f2ff8260e6ea869b7fb4a (diff)
downloadnixpkgs-11e25f1a3e89b9c54778c178f9b113e4b44ac111.tar
nixpkgs-11e25f1a3e89b9c54778c178f9b113e4b44ac111.tar.gz
nixpkgs-11e25f1a3e89b9c54778c178f9b113e4b44ac111.tar.bz2
nixpkgs-11e25f1a3e89b9c54778c178f9b113e4b44ac111.tar.lz
nixpkgs-11e25f1a3e89b9c54778c178f9b113e4b44ac111.tar.xz
nixpkgs-11e25f1a3e89b9c54778c178f9b113e4b44ac111.tar.zst
nixpkgs-11e25f1a3e89b9c54778c178f9b113e4b44ac111.zip
Implement per-user socket units
Diffstat (limited to 'nixos/modules/system/boot/systemd.nix')
-rw-r--r--nixos/modules/system/boot/systemd.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index ee94c91716c..51ebca7dd43 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -683,6 +683,13 @@ in
       description = "Definition of systemd per-user service units.";
     };
 
+    systemd.user.sockets = mkOption {
+      default = {};
+      type = types.attrsOf types.optionSet;
+      options = [ socketOptions unitConfig ];
+      description = "Definition of systemd per-user socket units.";
+    };
+
   };
 
 
@@ -767,7 +774,8 @@ in
                        in nameValuePair "${n}.automount" (automountToUnit n v)) cfg.automounts);
 
     systemd.user.units =
-      mapAttrs' (n: v: nameValuePair "${n}.service" (serviceToUnit n v)) cfg.user.services;
+      mapAttrs' (n: v: nameValuePair "${n}.service" (serviceToUnit n v)) cfg.user.services
+      // mapAttrs' (n: v: nameValuePair "${n}.socket" (socketToUnit n v)) cfg.user.sockets;
 
     system.requiredKernelConfig = map config.lib.kernelConfig.isEnabled
       [ "DEVTMPFS" "CGROUPS" "INOTIFY_USER" "SIGNALFD" "TIMERFD" "EPOLL" "NET"