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;
|
wg0Private.file = ../../secrets/fuyuki-wg0.age;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.connection.vpn.enable = true;
|
||||||
|
|
||||||
my.users = {
|
my.users = {
|
||||||
dala = {
|
dala = {
|
||||||
description = "Dala";
|
description = "Dala";
|
||||||
|
|
|
@ -54,6 +54,8 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.connection.vpn.enable = true;
|
||||||
|
|
||||||
# User config
|
# User config
|
||||||
my.users = {
|
my.users = {
|
||||||
dala = {
|
dala = {
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
./bluetooth.nix
|
./bluetooth.nix
|
||||||
./wireshark.nix
|
./wireshark.nix
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
|
./vpn.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config =
|
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