nixos: add enabled dataspace servers to systemd wants
This commit is contained in:
parent
cc09df4d35
commit
d7aadda36f
|
@ -14,7 +14,7 @@ with lib;
|
|||
description = ''
|
||||
Syndicate dataspace server instances.
|
||||
If the key is in the form of "tty''${N}" it will
|
||||
be attached to the appropriate teletypwriter.
|
||||
be attached to the appropriate teletypewriter.
|
||||
'';
|
||||
type = types.attrsOf (types.submodule {
|
||||
options = {
|
||||
|
@ -92,6 +92,11 @@ with lib;
|
|||
})
|
||||
(lib.attrsets.filterAttrs (_: cfg: cfg.enable) config.services.syndicate);
|
||||
|
||||
systemd.targets.multi-user.wants = lib.lists.flatten
|
||||
(lib.attrsets.mapAttrsToList
|
||||
(name: cfg: lib.optional cfg.enable "syndicate-${name}.service")
|
||||
config.services.syndicate);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue