linkwarden

This commit is contained in:
Danilo Reyes
2026-02-01 16:07:19 -06:00
parent b7eab2dd94
commit 32545e4fec
5 changed files with 100 additions and 62 deletions

View File

@@ -0,0 +1,34 @@
{
lib,
config,
...
}:
let
setup = import ../factories/mkserver.nix { inherit lib config; };
cfg = config.my.servers.linkwarden;
in
{
options.my.servers.linkwarden = setup.mkOptions "linkwarden" "links" 3000;
config = lib.mkIf (cfg.enable && config.my.servers.postgres.enable && config.my.secureHost) {
sops.secrets.linkwarden.sopsFile = ../../secrets/env.yaml;
services.linkwarden = {
inherit (cfg) enable;
host = cfg.ip;
port = cfg.port;
openFirewall = true;
environment = {
NEXTAUTH_URL = "${cfg.url}/api/v1/auth";
NEXT_PUBLIC_KEYCLOAK_ENABLED = "true";
OPENAI_MODEL = "gpt-4o";
KEYCLOAK_ISSUER = "${config.my.servers.keycloak.url}/realms/homelab";
};
environmentFile = config.sops.secrets.linkwarden.path;
database = {
host = config.my.postgresSocket;
name = cfg.name;
user = cfg.name;
createLocally = true;
};
};
};
}

View File

@@ -27,20 +27,21 @@ let
"$@"
'';
dbNames = [
"jawz"
"paperless"
"nextcloud"
"ryot"
"vaultwarden"
"shiori"
"mealie"
"firefly-iii"
"matrix-synapse"
"readeck"
"sonarqube"
"gitea"
"atticd"
"firefly-iii"
"gitea"
"jawz"
"keycloak"
"linkwarden"
"matrix-synapse"
"mealie"
"nextcloud"
"paperless"
"readeck"
"ryot"
"shiori"
"sonarqube"
"vaultwarden"
"webref"
];
in