nixos-config/modules/workstation/vpn.nix

25 lines
389 B
Nix
Raw Normal View History

2025-01-09 12:24:44 +01:00
{
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;
};
};
}