forked from mirrors/nixpkgs
wireguard module: add device name environment var
This makes the interface name available as an environment variable for the pre/post hooks.
This commit is contained in:
parent
4f8c5331c8
commit
711303952e
|
@ -195,6 +195,7 @@ let
|
||||||
description = "WireGuard Tunnel - ${name}";
|
description = "WireGuard Tunnel - ${name}";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
environment.DEVICE = name;
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|
Loading…
Reference in a new issue