diff options
author | makefu <github@syntax-fehler.de> | 2022-01-03 00:47:24 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2022-01-03 00:47:24 +0100 |
commit | 2313e962e2ac6dc6f1f59800d793101f958e8b37 (patch) | |
tree | c7b2e72daf4b48e140f0d5a09227c83325075d28 /krebs/3modules/tinc.nix | |
parent | 057adcb836ec7deedf0a0b2dd7f7dc7206c3f740 (diff) | |
parent | a64abcbc25393fd9ecad0cbd7baf2dd772508b58 (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs/3modules/tinc.nix')
-rw-r--r-- | krebs/3modules/tinc.nix | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/krebs/3modules/tinc.nix b/krebs/3modules/tinc.nix index a1824835..21ddde1c 100644 --- a/krebs/3modules/tinc.nix +++ b/krebs/3modules/tinc.nix @@ -222,12 +222,6 @@ with import <stockholm/lib>; nameValuePair netname {} ) config.krebs.tinc; - environment.etc = mapAttrs' (netname: cfg: - nameValuePair "tinc/${netname}" { - source = cfg.confDir; - } - ) config.krebs.tinc; - krebs.systemd.services = mapAttrs (netname: cfg: { }) config.krebs.tinc; @@ -239,8 +233,6 @@ with import <stockholm/lib>; cfg.iproutePackage cfg.tincPackage ]; - reloadIfChanged = true; - restartTriggers = [ cfg.confDir ]; serviceConfig = { Restart = "always"; LoadCredential = filter (x: x != "") [ @@ -249,6 +241,13 @@ with import <stockholm/lib>; ) "rsa_key:${cfg.privkey}" ]; + ExecStartPre = pkgs.writers.writeDash "init-tinc-${netname}" '' + ${pkgs.coreutils}/bin/mkdir -p /etc/tinc + ${pkgs.rsync}/bin/rsync -vaL --delete \ + --chown ${cfg.user.name} \ + --chmod u=rwX,g=rX \ + ${cfg.confDir}/ /etc/tinc/${netname}/ + ''; ExecStart = toString [ "${cfg.tincPackage}/sbin/tincd" "-D" |