aboutsummaryrefslogtreecommitdiff
path: root/modules/apps
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-05-07 21:15:52 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-05-07 21:15:52 +0300
commit2dccfb35d97dd39b76408b76b3962dee0e26ee6a (patch)
tree4b739ebeb953ccb240c8a8e37b5e44a911bd14bd /modules/apps
parent668f6fd8ccc598bfa76710d28e8bbb37923eafa9 (diff)
downloadnixsap-2dccfb35d97dd39b76408b76b3962dee0e26ee6a.tar.gz
sproxy2: enable by default if there are backends
Diffstat (limited to 'modules/apps')
-rw-r--r--modules/apps/sproxy2.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/apps/sproxy2.nix b/modules/apps/sproxy2.nix
index c084ac6..7786327 100644
--- a/modules/apps/sproxy2.nix
+++ b/modules/apps/sproxy2.nix
@@ -5,7 +5,7 @@ let
inherit (builtins) elem isBool isString;
inherit (lib)
concatMapStringsSep concatStringsSep filterAttrs imap
- mapAttrsToList mkEnableOption mkIf mkOption optionalString ;
+ mapAttrsToList mkIf mkOption optionalString ;
inherit (lib.types)
attrsOf bool either enum int listOf nullOr path str submodule ;
@@ -100,11 +100,17 @@ let
socket = optional path;
};
});
+ default = [];
};
in {
options.nixsap.apps.sproxy2 = {
- enable = mkEnableOption "sproxy2";
+ enable = mkOption {
+ description = "Enable Sproxy2";
+ type = bool;
+ default = (cfg.backends != []);
+ };
+
inherit oauth2 backends;
user = mkOption {
description = "User to run as";