summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/tinc.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2021-12-23 23:42:59 +0100
committerlassulus <lassulus@lassul.us>2021-12-23 23:59:22 +0100
commit2be08e3c528546de8e4a17d360153c2f59b07183 (patch)
tree6d5e085629d1b75020f3d2e2ece45f2fbf68e529 /krebs/3modules/tinc.nix
parent29b796f5216a6743f6c0230b23048fada0d6c2ef (diff)
systemd module: use LoadCredentials from config.systemd.services
Diffstat (limited to 'krebs/3modules/tinc.nix')
-rw-r--r--krebs/3modules/tinc.nix12
1 files changed, 6 insertions, 6 deletions
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 <stockholm/lib>;
) 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 <stockholm/lib>;
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"