Add wireguard to http proxy
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled
This commit is contained in:
@@ -3,5 +3,6 @@
|
||||
imports = [
|
||||
./configuration.nix
|
||||
../../services/http-proxy
|
||||
./wireguard.nix
|
||||
];
|
||||
}
|
||||
|
25
hosts/http-proxy/wireguard.nix
Normal file
25
hosts/http-proxy/wireguard.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
sops.secrets.wireguard_private_key = {
|
||||
sopsFile = ../../secrets/http-proxy/wireguard.yaml;
|
||||
key = "wg_private_key";
|
||||
};
|
||||
networking.wireguard = {
|
||||
enable = true;
|
||||
|
||||
interfaces = {
|
||||
wg0 = {
|
||||
ips = [ "10.69.222.2/24" ];
|
||||
listenPort = 51820;
|
||||
privateKeyFile = config.sops.secrets.wireguard_private_key.path;
|
||||
peers = [
|
||||
{
|
||||
publicKey = "32Rb13wExcy8uI92JTnFdiOfkv0mlQ6f181WA741DHs=";
|
||||
allowedIPs = [ "10.69.222.0/24" ];
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user