NixOS/modules/servers/shiori.nix
2025-10-12 13:41:48 -06:00

21 lines
532 B
Nix

{
lib,
config,
inputs,
...
}:
let
cfg = config.my.servers.shiori;
in
{
options.my.servers.shiori = inputs.self.lib.mkServerOptions "shiori" "bookmarks" 4368 lib;
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}";
};
};
}