diff options
| author | Adam Washington <[email protected]> | 2021-09-10 15:35:32 +0000 |
|---|---|---|
| committer | Adam Washington <[email protected]> | 2021-09-10 15:35:32 +0000 |
| commit | 45696d3f8e854a47faeedfa7492793f6bb5710b3 (patch) | |
| tree | 03cbfce733f7cc0700184ec62e6f4f52c7c69fb5 /flake.nix | |
| parent | Make a real PIA module (diff) | |
| download | pia.nix-45696d3f8e854a47faeedfa7492793f6bb5710b3.tar.xz pia.nix-45696d3f8e854a47faeedfa7492793f6bb5710b3.zip | |
Require explicit enable
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -4,17 +4,21 @@ nixosModule = { config }: { options = { services.pia.authUserPass = { - username = nixpkgs.lib.mkOption { + enable = nixpkgs.lib.mkOption { default = false; type = nixpkgs.lib.types.bool; }; + username = nixpkgs.lib.mkOption { + default = false; + type = nixpkgs.lib.types.string; + }; password = nixpkgs.lib.mkOption { default = false; - type = nixpkgs.lib.types.bool; + type = nixpkgs.lib.types.string; }; }; }; - config = { + config = nixpkgs.lib.mkIf config.services.pia.enable { services.openvpn.servers = let resources = nixpkgs.fetchzip { name = "pia-vpn-config"; |