vpn: init
This commit is contained in:
31
flake.nix
31
flake.nix
@@ -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 = {};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user