Switch to wg-quick for WireGuard
This commit is contained in:
parent
29b60993ef
commit
b26e45e8d0
1 changed files with 33 additions and 6 deletions
|
@ -140,19 +140,19 @@
|
||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
wireguard.interfaces = {
|
wg-quick.interfaces = {
|
||||||
wghorus = {
|
wghorus = {
|
||||||
ips = [ "10.10.4.2/24" ];
|
address = [ "10.10.4.2/24" ];
|
||||||
|
autostart = false;
|
||||||
|
dns = [ "192.168.4.1" ];
|
||||||
listenPort = 51820;
|
listenPort = 51820;
|
||||||
|
|
||||||
privateKeyFile = config.sops.secrets.wireguard-horus-privkey.path;
|
privateKeyFile = config.sops.secrets.wireguard-horus-privkey.path;
|
||||||
|
|
||||||
postSetup = ''
|
postUp = ''
|
||||||
${pkgs.systemd}/bin/resolvectl dns wghorus 192.168.4.1
|
|
||||||
${pkgs.systemd}/bin/resolvectl domain wghorus bedum.horus.nu internal.horus.nu
|
${pkgs.systemd}/bin/resolvectl domain wghorus bedum.horus.nu internal.horus.nu
|
||||||
'';
|
'';
|
||||||
postShutdown = ''
|
postDown = ''
|
||||||
${pkgs.systemd}/bin/resolvectl dns wghorus ""
|
|
||||||
${pkgs.systemd}/bin/resolvectl domain wghorus ""
|
${pkgs.systemd}/bin/resolvectl domain wghorus ""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -166,6 +166,33 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# wireguard.interfaces = {
|
||||||
|
# wghorus = {
|
||||||
|
# ips = [ "10.10.4.2/24" ];
|
||||||
|
# listenPort = 51820;
|
||||||
|
|
||||||
|
# privateKeyFile = config.sops.secrets.wireguard-horus-privkey.path;
|
||||||
|
|
||||||
|
# postSetup = ''
|
||||||
|
# ${pkgs.systemd}/bin/resolvectl dns wghorus 192.168.4.1
|
||||||
|
# ${pkgs.systemd}/bin/resolvectl domain wghorus bedum.horus.nu internal.horus.nu
|
||||||
|
# '';
|
||||||
|
# postShutdown = ''
|
||||||
|
# ${pkgs.systemd}/bin/resolvectl dns wghorus ""
|
||||||
|
# ${pkgs.systemd}/bin/resolvectl domain wghorus ""
|
||||||
|
# '';
|
||||||
|
|
||||||
|
# peers = [
|
||||||
|
# {
|
||||||
|
# publicKey = "6faxlUG8+F7uVrKk/OJqqy5k2+OzrhXc/cV6Zsfbl0c=";
|
||||||
|
# allowedIPs = [ "192.168.4.0/23" "192.168.6.0/24" "192.168.7.0/24" "192.168.8.0/24" ];
|
||||||
|
# endpoint = "212.45.34.195:51820";
|
||||||
|
# persistentKeepalive = 25;
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.network = {
|
systemd.network = {
|
||||||
|
|
Loading…
Reference in a new issue