vpn: init

This commit is contained in:
illustris
2026-03-09 11:43:48 +05:30
parent 5c5fdff4d4
commit 682430ca60

View File

@@ -175,6 +175,37 @@
})]; })];
}; };
vpn = {
vcpu = 2;
mem = 2047;
extraModules = [({ pkgs, ... }: {
imports = [ self.nixosModules.storeOverlay ];
# Mount ovpn configs read-only
microvm.shares = [
{
proto = "9p";
tag = "ovpn";
source = "/home/illustris/Documents/ovpn/air";
mountPoint = "/etc/openvpn/air";
readOnly = true;
}
];
# OpenVPN client service
services.openvpn.servers.airvpn = {
config = ''
config /etc/openvpn/air/AirVPN_United-States_UDP-443.ovpn
'';
autoStart = true;
};
environment.systemPackages = with pkgs; [
openvpn
];
})];
};
crash = {}; crash = {};
}; };
}; };