diff options
author | lassulus <lassulus@lassul.us> | 2020-08-06 23:24:29 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2020-08-06 23:24:29 +0200 |
commit | e0e91cfd74c9ce5d3f9ce9c2e2efab322a00f960 (patch) | |
tree | f17565a1d7bc496b0b439ff45010f3f9c91c6d4f /krebs/3modules/tinc.nix | |
parent | 04d9ff2dcdc039518391fcb41ffbb256e2f4ba23 (diff) | |
parent | 42df7da046f46efaca0cb0243a6de3aff599c8aa (diff) |
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'krebs/3modules/tinc.nix')
-rw-r--r-- | krebs/3modules/tinc.nix | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/krebs/3modules/tinc.nix b/krebs/3modules/tinc.nix index 8b6e959d4..1fca7de5c 100644 --- a/krebs/3modules/tinc.nix +++ b/krebs/3modules/tinc.nix @@ -158,6 +158,7 @@ let privkey = mkOption { type = types.secret-file; default = { + name = "${tinc.config.netname}.rsa_key.priv"; path = "${tinc.config.user.home}/tinc.rsa_key.priv"; owner = tinc.config.user; source-path = toString <secrets> + "/${tinc.config.netname}.rsa_key.priv"; @@ -219,9 +220,14 @@ let iproute = cfg.iproutePackage; in { description = "Tinc daemon for ${netname}"; - after = [ "network.target" ]; + after = [ + config.krebs.secret.files."${netname}.rsa_key.priv".service + "network.target" + ]; + partOf = [ + config.krebs.secret.files."${netname}.rsa_key.priv".service + ]; wantedBy = [ "multi-user.target" ]; - requires = [ "secret.service" ]; path = [ tinc iproute ]; serviceConfig = rec { Restart = "always"; |