refactor wireguard configs

This commit is contained in:
Adithya 2023-10-08 15:51:42 +05:30
parent 4306a9cdd7
commit 0530b9f515
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
2 changed files with 4 additions and 4 deletions

View file

@ -3,7 +3,7 @@
secrets, secrets,
... ...
}: let }: let
inherit (secrets.wireguard_config) peers Proxy Skipper; inherit (secrets.wireguard_config) peers;
in { in {
networking.wireguard = { networking.wireguard = {
enable = true; enable = true;
@ -12,7 +12,7 @@ in {
inherit (peers."${config.networking.hostName}") ips; inherit (peers."${config.networking.hostName}") ips;
privateKeyFile = "/etc/wireguard/private.key"; privateKeyFile = "/etc/wireguard/private.key";
generatePrivateKeyFile = true; generatePrivateKeyFile = true;
peers = [ peers = with peers; [
Proxy Proxy
Skipper Skipper
]; ];

View file

@ -3,7 +3,7 @@
secrets, secrets,
... ...
}: let }: let
inherit (secrets.wireguard_config) peers Proxy Rico2; inherit (secrets.wireguard_config) peers;
in { in {
networking.wireguard = { networking.wireguard = {
enable = true; enable = true;
@ -12,7 +12,7 @@ in {
inherit (peers."${config.networking.hostName}") ips; inherit (peers."${config.networking.hostName}") ips;
privateKeyFile = "/etc/wireguard/private.key"; privateKeyFile = "/etc/wireguard/private.key";
generatePrivateKeyFile = true; generatePrivateKeyFile = true;
peers = [ peers = with peers; [
Proxy Proxy
Rico2 Rico2
]; ];