Set up wireguard

This commit is contained in:
Charlotte 🦝 Delenk 2022-01-14 15:38:01 +01:00
parent 8d4b3370b4
commit 9801466a28
Signed by: darkkirb
GPG key ID: 015E3768A70AFBC5
3 changed files with 13 additions and 0 deletions

View file

@ -4,6 +4,7 @@
./users/darkkirb.nix
./nix.nix
./sops.nix
./wireguard.nix
];
services.openssh.enable = true;
environment.systemPackages = [ pkgs.git ];

View file

@ -120,4 +120,6 @@
Gateway = fe80::1
'';
};
networking.wireguard.interfaces."wg0".ips = [ "fd0d:a262:1fa6:e621:b4e1:08ff:e658:6f49/64" ];
}

10
config/wireguard.nix Normal file
View file

@ -0,0 +1,10 @@
{ ... }:
{
networking.wireguard = {
enable = true;
interfaces."wg0" = {
listenPort = 51820;
privateKeyFile = "/run/secrets/network/wireguard/privkey";
};
};
}