Refactor flake patching/recursion
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -24,8 +24,9 @@ in
|
||||
wireguard.interfaces.wg0 =
|
||||
let
|
||||
ip = "${pkgs.iproute2}/bin/ip";
|
||||
table = "wireguard";
|
||||
in
|
||||
rec {
|
||||
{
|
||||
ips = [
|
||||
"10.0.0.2/24"
|
||||
"${jupiterPublicIPv4}/32"
|
||||
@@ -33,7 +34,7 @@ in
|
||||
|
||||
privateKeyFile = config.sops.secrets."wireguard/client/vps".path;
|
||||
|
||||
table = "wireguard";
|
||||
inherit table;
|
||||
postSetup = [ "${ip} rule add from ${jupiterPublicIPv4} table ${table}" ];
|
||||
postShutdown = [ "${ip} rule del from ${jupiterPublicIPv4} table ${table}" ];
|
||||
|
||||
|
Reference in New Issue
Block a user