diff options
Diffstat (limited to 'lib/secrets')
-rw-r--r-- | lib/secrets/default.nix | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/secrets/default.nix b/lib/secrets/default.nix index 9592052..3c2da95 100644 --- a/lib/secrets/default.nix +++ b/lib/secrets/default.nix @@ -77,14 +77,16 @@ in default = { }; }; - config.systemd.services = - let - units = mapAttrs' - (name: info: { - name = "${name}-key"; - value = (mkService name info); - }) - cfg; - in - units; + config = mkIf (cfg != []) { + systemd.services = + let + units = mapAttrs' + (name: info: { + name = "${name}-key"; + value = (mkService name info); + }) + cfg; + in + units; + }; } |