summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorWilliButz <WilliButz@users.noreply.github.com>2019-06-09 11:51:45 +0200
committerAristid Breitkreuz <aristidb@gmail.com>2019-06-09 11:51:45 +0200
commitf491e94bacd04996f447ef91596f8977e96acca1 (patch)
tree2fe2a87b84d58d49c7d220e93291e0c1c54d6857 /nixos/modules/services
parent08fb31692e367e7ef78aef9c17e5447f26dfd6a6 (diff)
nixos/wireguard: add peer service to interface dependencies (#62828)
Previously each oneshot peer service only ran once and was not restarted together with the interface unit. Because of this, defined peers were missing after restarting their corresponding interface unit. Co-Authored-By: Franz Pletz <fpletz@fnordicwalking.de>
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/networking/wireguard.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/wireguard.nix b/nixos/modules/services/networking/wireguard.nix
index e9dcb0fc896c..4176da2c8cb8 100644
--- a/nixos/modules/services/networking/wireguard.nix
+++ b/nixos/modules/services/networking/wireguard.nix
@@ -244,7 +244,7 @@ let
description = "WireGuard Peer - ${interfaceName} - ${peer.publicKey}";
requires = [ "wireguard-${interfaceName}.service" ];
after = [ "wireguard-${interfaceName}.service" ];
- wantedBy = [ "multi-user.target" ];
+ wantedBy = [ "multi-user.target" "wireguard-${interfaceName}.service" ];
environment.DEVICE = interfaceName;
environment.WG_ENDPOINT_RESOLUTION_RETRIES = "infinity";
path = with pkgs; [ iproute wireguard-tools ];