From f491e94bacd04996f447ef91596f8977e96acca1 Mon Sep 17 00:00:00 2001 From: WilliButz Date: Sun, 9 Jun 2019 11:51:45 +0200 Subject: [PATCH] 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 --- nixos/modules/services/networking/wireguard.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/wireguard.nix b/nixos/modules/services/networking/wireguard.nix index e9dcb0fc896..4176da2c8cb 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 ];