generify the vpn setup

This commit is contained in:
Lillian Violet 2024-12-23 19:22:28 +01:00
parent 8c454565d8
commit c72c30a4be
8 changed files with 68 additions and 79 deletions

View file

@ -3,7 +3,6 @@
outputs,
lib,
pkgs,
config,
...
}: {
imports = [
@ -15,6 +14,8 @@
# Or modules exported from other flakes (such as nix-colors):
# inputs.nix-colors.homeManagerModules.default
outputs.nixosModules.vpn-ip
# Import the shared settings
../../desktop/package-configs/firefox
@ -63,27 +64,11 @@
firewall.allowedTCPPorts = [22];
hostName = "shodan";
wireguard.enable = true;
wg-quick.interfaces = {
wg0 = {
autostart = true;
address = ["10.0.0.4/24" "fdc9:281f:04d7:9ee9::4/64"];
dns = ["10.0.0.1" "fdc9:281f:04d7:9ee9::1"];
listenPort = 51821;
privateKeyFile = config.sops.secrets."wg-private-key".path;
peers = [
{
publicKey = "A02sO7uLdgflhPIRd0cbJONIaPP4z8HTxDkmX4NegFg=";
endpoint = "84.87.146.85:51821";
allowedIPs = ["0.0.0.0/0" "::/0"];
persistentKeepalive = 25;
}
];
};
};
};
services.vpn-ip = {
ip = "4";
};
services = {
openssh.enable = true; # Enables support for 32bit libs that steam uses