workstations: Add mullvad-vpn
This commit is contained in:
parent
6a27d8574d
commit
8165007ed4
4 changed files with 29 additions and 0 deletions
|
@ -18,6 +18,8 @@
|
|||
wg0Private.file = ../../secrets/fuyuki-wg0.age;
|
||||
};
|
||||
|
||||
my.connection.vpn.enable = true;
|
||||
|
||||
my.users = {
|
||||
dala = {
|
||||
description = "Dala";
|
||||
|
|
|
@ -54,6 +54,8 @@
|
|||
];
|
||||
};
|
||||
|
||||
my.connection.vpn.enable = true;
|
||||
|
||||
# User config
|
||||
my.users = {
|
||||
dala = {
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
./bluetooth.nix
|
||||
./wireshark.nix
|
||||
./ssh.nix
|
||||
./vpn.nix
|
||||
];
|
||||
|
||||
config =
|
||||
|
|
24
modules/workstation/vpn.nix
Normal file
24
modules/workstation/vpn.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
vpnConfigEnable = config.my.connection.vpn.enable;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
options.my.connection.vpn.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Enable the Mullvad VPN stack.";
|
||||
};
|
||||
|
||||
config = mkIf vpnConfigEnable {
|
||||
services.mullvad-vpn = {
|
||||
enable = true;
|
||||
package = pkgs.mullvad-vpn;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue