karakeep: use native nix module

This commit is contained in:
Nico 2026-01-11 21:59:44 +11:00
parent bd91e9a659
commit 0d346e5ae6
Signed by: nico
SSH key fingerprint: SHA256:XuacYOrGqRxC3jVFjfLROn1CSvLz85Dec6N7O9Gwu/0
2 changed files with 8 additions and 14 deletions

View file

@ -1,12 +1,10 @@
{ config, ... }:
{
virtualisation.oci-containers.containers.karakeep = {
image = "ghcr.io/karakeep-app/karakeep:release";
volumes = [ "/var/lib/karakeep/data:/data" ];
ports = [ "8023:3000" ];
environment = {
DATA_DIR = "/data"; # dont change
services.karakeep = {
enable = true;
extraEnvironment = {
PORT = "8023";
OAUTH_WELLKNOWN_URL = "https://${config.homelab.authDomain}/oauth2/openid/karakeep/.well-known/openid-configuration";
OAUTH_PROVIDER_NAME = "${config.homelab.domain}";
@ -16,14 +14,9 @@
OAUTH_ALLOW_DANGEROUS_EMAIL_ACCOUNT_LINKING = "true";
};
environmentFiles = [
# put the environment variable NEXTAUTH_SECRET in here
# with a randomly generated string. gen with `openssl rand -base64 36`
/var/lib/karakeep/nextauth-secret
# https://pocket-id.org/docs/client-examples/hoarder
/var/lib/karakeep/oidc
];
# put OAUTH_CLIENT_SECRET and OAUTH_CLIENT_ID in file
# https://docs.karakeep.app/configuration/environment-variables#authentication--signup
environmentFile = "/var/lib/karakeep/oidc";
};
services.caddy.virtualHosts."karakeep.${config.homelab.domain}" = {