diff --git a/hosts/chunk/default.nix b/hosts/chunk/default.nix index 577e9b5..c07e10e 100644 --- a/hosts/chunk/default.nix +++ b/hosts/chunk/default.nix @@ -27,6 +27,7 @@ ./forgejo.nix ./garage.nix ./tailscale.nix + ./shiori.nix ]; sops.age.keyFile = "/root/.config/sops/age/keys.txt"; diff --git a/hosts/chunk/postgres.nix b/hosts/chunk/postgres.nix index 07a3125..0e5b1e4 100644 --- a/hosts/chunk/postgres.nix +++ b/hosts/chunk/postgres.nix @@ -11,12 +11,17 @@ ensureDatabases = [ "hedgedoc" "atticd" + "shiori" ]; ensureUsers = [ { name = "atticd"; ensureDBOwnership = true; } + { + name = "shiori"; + ensureDBOwnership = true; + } ]; }; services.postgresqlBackup = { diff --git a/hosts/chunk/shiori.nix b/hosts/chunk/shiori.nix new file mode 100644 index 0000000..f885c39 --- /dev/null +++ b/hosts/chunk/shiori.nix @@ -0,0 +1,14 @@ +{...}: +{ + services.shiori = { + enable = true; + address = "127.0.0.1"; + port = 8091; + databaseUrl = "postgres:///shiori?host=/run/postgresql"; + }; + + services.caddy.virtualHosts."link.cy7.sh".extraConfig = '' + import common + reverse_proxy localhost:8091 + ''; +}