diff options
author | Paul Colomiets <paul@colomiets.name> | 2014-06-20 21:34:21 +0300 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-06-20 17:41:14 -0400 |
commit | 11e25f1a3e89b9c54778c178f9b113e4b44ac111 (patch) | |
tree | 735452cf5cb5cf467c0b3a04b6ffc69d08dc04ec /nixos/modules/system/boot/systemd.nix | |
parent | 4d0d8916446584c8588f2ff8260e6ea869b7fb4a (diff) | |
download | nixpkgs-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.nix | 10 |
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" |