1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 05:29:46 +01:00

Add support for systemd path units

This commit is contained in:
Olli Helenius 2018-06-29 13:14:35 +03:00 committed by Robert Helgesson
parent 97ee4578c9
commit 299e01722f
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -11,7 +11,8 @@ let
enabled = cfg.services != {}
|| cfg.sockets != {}
|| cfg.targets != {}
|| cfg.timers != {};
|| cfg.timers != {}
|| cfg.paths != {};
toSystemdIni = generators.toINI {
mkKeyValue = key: value:
@ -108,6 +109,15 @@ in
'';
};
paths = mkOption {
default = {};
type = attrsRecursivelyMerged;
description = ''
Definition of systemd per-user path units. Attributes are
merged recursively.
'';
};
startServices = mkOption {
default = false;
type = types.bool;
@ -138,7 +148,7 @@ in
let
names = concatStringsSep ", " (
attrNames (
cfg.services // cfg.sockets // cfg.targets // cfg.timers
cfg.services // cfg.sockets // cfg.targets // cfg.timers // cfg.paths
)
);
in
@ -159,6 +169,8 @@ in
(buildServices "target" cfg.targets)
++
(buildServices "timer" cfg.timers)
++
(buildServices "path" cfg.paths)
);
# Run systemd service reload if user is logged in. If we're