dotfiles/modules/services/mullvad.nix

28 lines
489 B
Nix

{ config
, lib
, pkgs
, ...
}:
with lib;
let
cfg = config.my.services.mullvad;
in
{
options.my.services.mullvad.enable = mkEnableOption "mullvad";
config = lib.mkIf cfg.enable {
environment.persistence."/persist" = {
directories = [
"/etc/mullvad-vpn/"
];
users.moritz.directories = [
".config/Mullvad VPN/"
];
};
services.mullvad-vpn.enable = true;
users.users.moritz.packages = with pkgs; [
mullvad-vpn
];
};
}