Implement per-user socket units

This commit is contained in:
Paul Colomiets 2014-06-20 21:34:21 +03:00 committed by Eelco Dolstra
parent 4d0d891644
commit 11e25f1a3e
1 changed files with 9 additions and 1 deletions

View File

@ -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"