add wireguard config

This commit is contained in:
Adithya 2023-10-08 13:21:45 +05:30
parent 5c1f0eb8ad
commit 57d389ead7
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
2 changed files with 16 additions and 0 deletions

View file

@ -1,4 +1,5 @@
{lib, ...}: {
imports = [./wireguard.nix];
networking = {
hostName = "Skipper";
networkmanager = {

View file

@ -0,0 +1,15 @@
_: {
networking.wireguard = {
enable = true;
interfaces = {
wg0 = {
ips = [
"10.8.1.2/24"
"fdd9:69ae:9703::2/64"
];
privateKeyFile = "/etc/wireguard/private.key";
generatePrivateKeyFile = true;
};
};
};
}