24 lines
389 B
Nix
24 lines
389 B
Nix
{
|
|
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;
|
|
};
|
|
};
|
|
}
|