NixOS/modules/servers/shiori.nix
2025-10-12 19:59:46 -06:00

21 lines
570 B
Nix

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