From 2bf095c55321b3135fb6d88b1bdceefd63abee38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Wed, 16 Dec 2020 22:25:27 +0100 Subject: [PATCH] feat(tinc): reaload if changed (stolen from @Mic92) --- modules/retiolum.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/retiolum.nix b/modules/retiolum.nix index 646f750..7e56430 100644 --- a/modules/retiolum.nix +++ b/modules/retiolum.nix @@ -55,6 +55,11 @@ in { mkdir -p /etc/tinc/${netname}/hosts/ cp ${hostsPackage}/* /etc/tinc/${netname}/hosts/ ''; + + # 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.extraHosts =