aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/flake.nix b/flake.nix
index b5a1a67..0470597 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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";