From 6562fb28a1eb3af186a65ccd3f9e83a607fc51b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 12 Dec 2020 07:45:02 +0100 Subject: [PATCH] tinc: reload instead of restart --- modules/retiolum/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/retiolum/default.nix b/modules/retiolum/default.nix index 8da3242..1b934fb 100644 --- a/modules/retiolum/default.nix +++ b/modules/retiolum/default.nix @@ -65,8 +65,12 @@ in { }; }; - # Some hosts require VPN for nixos-rebuild, so we don't want to restart it on update - systemd.services."tinc.${netname}".restartIfChanged = false; + systemd.services."tinc.${netname}" = { + # Some hosts require VPN for nixos-rebuild, so we don't want to restart it on update + reloadIfChanged = true; + # also in https://github.com/NixOS/nixpkgs/pull/106715 + serviceConfig.ExecReload = "${config.services.tinc.networks.${netname}.package}/bin/tinc -n ${netname} reload"; + }; networking.firewall.allowedTCPPorts = [ 655 ]; networking.firewall.allowedUDPPorts = [ 655 ];