From 34f2198f40c65d09cb24c3a3025ea455bf1ba352 Mon Sep 17 00:00:00 2001 From: ibizaman Date: Thu, 30 Nov 2023 10:35:12 -0800 Subject: [PATCH] fixes issues with docs generation --- modules/blocks/authelia.nix | 18 +++++++++++++----- modules/blocks/postgresql.nix | 2 +- modules/blocks/vpn.nix | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/modules/blocks/authelia.nix b/modules/blocks/authelia.nix index 36b005e..ef1b112 100644 --- a/modules/blocks/authelia.nix +++ b/modules/blocks/authelia.nix @@ -14,7 +14,7 @@ in subdomain = lib.mkOption { type = lib.types.str; description = "Subdomain under which Authelia will be served."; - example = "ha"; + example = "auth"; }; domain = lib.mkOption { @@ -36,9 +36,17 @@ in }; autheliaUser = lib.mkOption { - type = lib.types.str; - description = "System user for this Authelia instance"; - default = "authelia_" + builtins.replaceStrings ["-" "."] ["_" "_"] fqdn; + type = lib.types.nullOr lib.types.str; + description = ''System user for this Authelia instance. + +If set to null, defaults to: + +"authelia_" + + (builtins.replaceStrings ["-" "."] ["_" "_"] + ''${shb.authelia.subdomain}.''${shb.authelia.domain}") + +''; + default = null; }; secrets = lib.mkOption { @@ -112,7 +120,7 @@ in services.authelia.instances.${fqdn} = { enable = true; - user = cfg.autheliaUser; + user = cfg.autheliaUser or "authelia_" + builtins.replaceStrings ["-" "."] ["_" "_"] fqdn; secrets = { inherit (cfg.secrets) jwtSecretFile storageEncryptionKeyFile; diff --git a/modules/blocks/postgresql.nix b/modules/blocks/postgresql.nix index 86b400c..55039e3 100644 --- a/modules/blocks/postgresql.nix +++ b/modules/blocks/postgresql.nix @@ -6,7 +6,7 @@ in options.shb.postgresql = { debug = lib.mkOption { type = lib.types.bool; - description = lib.mdDocs '' + description = lib.mdDoc '' Enable debugging options. Currently enables shared_preload_libraries = "auto_explain, pg_stat_statements" diff --git a/modules/blocks/vpn.nix b/modules/blocks/vpn.nix index 19e2b93..96c91ce 100644 --- a/modules/blocks/vpn.nix +++ b/modules/blocks/vpn.nix @@ -211,7 +211,7 @@ in provider = lib.mkOption { description = lib.mdDoc "VPN provider, if given uses ready-made configuration."; - type = lib.types.nullOf (lib.types.enum [ "nordvpn" ]); + type = lib.types.nullOr (lib.types.enum [ "nordvpn" ]); default = null; };