From 2dccfb35d97dd39b76408b76b3962dee0e26ee6a Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sun, 7 May 2017 21:15:52 +0300 Subject: sproxy2: enable by default if there are backends --- modules/apps/sproxy2.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'modules') 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"; -- cgit v1.2.3