Set up wireguard
This commit is contained in:
parent
8d4b3370b4
commit
9801466a28
3 changed files with 13 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
||||||
./users/darkkirb.nix
|
./users/darkkirb.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
./sops.nix
|
./sops.nix
|
||||||
|
./wireguard.nix
|
||||||
];
|
];
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
environment.systemPackages = [ pkgs.git ];
|
environment.systemPackages = [ pkgs.git ];
|
||||||
|
|
|
@ -120,4 +120,6 @@
|
||||||
Gateway = fe80::1
|
Gateway = fe80::1
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.wireguard.interfaces."wg0".ips = [ "fd0d:a262:1fa6:e621:b4e1:08ff:e658:6f49/64" ];
|
||||||
}
|
}
|
||||||
|
|
10
config/wireguard.nix
Normal file
10
config/wireguard.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
networking.wireguard = {
|
||||||
|
enable = true;
|
||||||
|
interfaces."wg0" = {
|
||||||
|
listenPort = 51820;
|
||||||
|
privateKeyFile = "/run/secrets/network/wireguard/privkey";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue