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>
This commit is contained in:
WilliButz 2019-06-09 11:51:45 +02:00 committed by Aristid Breitkreuz
parent 08fb31692e
commit f491e94bac

View File

@ -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 ];