From 2be08e3c528546de8e4a17d360153c2f59b07183 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 23 Dec 2021 23:42:59 +0100 Subject: systemd module: use LoadCredentials from config.systemd.services --- krebs/3modules/tinc.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'krebs/3modules/tinc.nix') diff --git a/krebs/3modules/tinc.nix b/krebs/3modules/tinc.nix index dca764f6..a1824835 100644 --- a/krebs/3modules/tinc.nix +++ b/krebs/3modules/tinc.nix @@ -229,12 +229,6 @@ with import ; ) config.krebs.tinc; krebs.systemd.services = mapAttrs (netname: cfg: { - serviceConfig.LoadCredential = filter (x: x != "") [ - (optionalString (cfg.privkey_ed25519 != null) - "ed25519_key:${cfg.privkey_ed25519}" - ) - "rsa_key:${cfg.privkey}" - ]; }) config.krebs.tinc; systemd.services = mapAttrs (netname: cfg: { @@ -249,6 +243,12 @@ with import ; restartTriggers = [ cfg.confDir ]; serviceConfig = { Restart = "always"; + LoadCredential = filter (x: x != "") [ + (optionalString (cfg.privkey_ed25519 != null) + "ed25519_key:${cfg.privkey_ed25519}" + ) + "rsa_key:${cfg.privkey}" + ]; ExecStart = toString [ "${cfg.tincPackage}/sbin/tincd" "-D" -- cgit v1.2.3