From 97539f9b1b004f1b8b8aa2608e92050b7f3d2433 Mon Sep 17 00:00:00 2001 From: Linnnus Date: Thu, 7 Sep 2023 17:36:58 +0200 Subject: Make reorganization """work""" for mac --- lib/secrets/default.nix | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'lib/secrets') 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; + }; } -- cgit v1.2.3