From 896c376b6d27b05a76c745352fd7f6b81cf34329 Mon Sep 17 00:00:00 2001 From: ibizaman Date: Mon, 12 Aug 2024 02:33:33 +0200 Subject: [PATCH] add mount contract to authelia block --- modules/blocks/authelia.nix | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/modules/blocks/authelia.nix b/modules/blocks/authelia.nix index e622efa..5669fa8 100644 --- a/modules/blocks/authelia.nix +++ b/modules/blocks/authelia.nix @@ -202,6 +202,43 @@ in description = "Rule based clients"; default = []; }; + + mount = lib.mkOption { + type = contracts.mount; + description = '' + Mount configuration. This is an output option. + + Use it to initialize a block implementing the "mount" contract. + For example, with a zfs dataset: + + ``` + shb.zfs.datasets."authelia" = { + poolName = "root"; + } // config.shb.authelia.mount; + ``` + ''; + readOnly = true; + default = { path = "/var/lib/authelia-authelia.${cfg.domain}"; }; + defaultText = { path = "/var/lib/authelia-authelia.example.com"; }; + }; + + mountRedis = lib.mkOption { + type = contracts.mount; + description = '' + Mount configuration for Redis. This is an output option. + + Use it to initialize a block implementing the "mount" contract. + For example, with a zfs dataset: + + ``` + shb.zfs.datasets."redis-authelia" = { + poolName = "root"; + } // config.shb.authelia.mountRedis; + ``` + ''; + readOnly = true; + default = { path = "/var/lib/redis-authelia"; }; + }; }; config = lib.mkIf cfg.enable {