setup wireguard stuff on rico1
This commit is contained in:
parent
910317d5cc
commit
858dbaa2db
1 changed files with 22 additions and 0 deletions
22
hosts/rico1/wireguard.nix
Normal file
22
hosts/rico1/wireguard.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
secrets,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (secrets.wireguard_config) peers;
|
||||||
|
in {
|
||||||
|
networking.firewall.trustedInterfaces = ["wg0"];
|
||||||
|
networking.wireguard = {
|
||||||
|
enable = true;
|
||||||
|
interfaces = {
|
||||||
|
wg0 = {
|
||||||
|
inherit (peers."${config.networking.hostName}") ips listenPort;
|
||||||
|
privateKeyFile = "/etc/wireguard/private.key";
|
||||||
|
generatePrivateKeyFile = true;
|
||||||
|
peers = with peers; [
|
||||||
|
Proxy.peer
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue