added secureHost flag

This commit is contained in:
2025-09-28 10:52:27 -06:00
parent d704e0ee13
commit a376428118
24 changed files with 100 additions and 87 deletions

View File

@@ -5,13 +5,16 @@ let
in
{
options.my.servers.shiori = setup.mkOptions "shiori" "bookmarks" 4368;
config = lib.mkIf (config.my.servers.shiori.enable && config.my.servers.postgres.enable) {
sops.secrets = lib.mkIf cfg.enable { shiori.sopsFile = ../../secrets/env.yaml; };
services.shiori = lib.mkIf cfg.enable {
inherit (cfg) port;
enable = true;
environmentFile = config.sops.secrets.shiori.path;
databaseUrl = "postgres:///shiori?host=${config.my.postgresSocket}";
};
};
config =
lib.mkIf
(config.my.servers.shiori.enable && config.my.servers.postgres.enable && config.my.secureHost)
{
sops.secrets.shiori.sopsFile = ../../secrets/env.yaml;
services.shiori = {
inherit (cfg) port;
enable = true;
environmentFile = config.sops.secrets.shiori.path;
databaseUrl = "postgres:///shiori?host=${config.my.postgresSocket}";
};
};
}