Some checks failed
CI / check (push) Has been cancelled
CI / ida (push) Has been cancelled
CI / cpt (push) Has been cancelled
CI / build-nixos (ena) (push) Has been cancelled
CI / build-nixos (hako) (push) Has been cancelled
CI / build-nixos (kazusa) (push) Has been cancelled
CI / build-nixos (mizuki) (push) Has been cancelled
37 lines
1 KiB
Nix
37 lines
1 KiB
Nix
{ config, ... }:
|
|
let
|
|
immichSecret = key: {
|
|
sopsFile = ../secrets/immich.yaml;
|
|
inherit key;
|
|
owner = "immich";
|
|
};
|
|
in
|
|
{
|
|
sops.secrets."immich/oauth2/client-id" = immichSecret "immich/oauth2/client-id";
|
|
sops.secrets."immich/oauth2/client-secret" = immichSecret "immich/oauth2/client-secret";
|
|
|
|
services.immich = {
|
|
enable = true;
|
|
host = "0.0.0.0";
|
|
port = 10040;
|
|
|
|
mediaLocation = "/mnt/data/immich/media";
|
|
openFirewall = true;
|
|
machine-learning.enable = false;
|
|
|
|
settings = {
|
|
server.externalDomain = "https://i.mizuki.guru";
|
|
machineLearning = {
|
|
enabled = false;
|
|
};
|
|
oauth = {
|
|
enabled = true;
|
|
issuerUrl = "https://auth.mizuki.guru/application/o/immich/.well-known/openid-configuration";
|
|
clientId._secret = config.sops.secrets."immich/oauth2/client-id".path;
|
|
clientSecret._secret = config.sops.secrets."immich/oauth2/client-secret".path;
|
|
scope = "openid email profile";
|
|
buttonText = "Login with mizuki";
|
|
};
|
|
};
|
|
};
|
|
}
|