Files
nixos/hosts/common/optional/selfhosted/homarr/server/config.nix
T
aloslider c92b90e406 Small modules config restructure
Changed variables names in every module
2026-10-31 19:48:50 +03:00

28 lines
932 B
Nix

{ config, lib, ... }:
with lib;
let
rootCfg = config.selfhosted;
moduleCfg = rootCfg.homarr;
poCfg = rootCfg.pocket-id;
oidpDomain = "https://${poCfg.subdomain}.${config.sops.placeholder."domains/serv"}";
in
{
config = mkIf moduleCfg.enable {
sops.templates."homarr.env" = {
content = ''
SECRET_ENCRYPTION_KEY=${config.sops.placeholder."homarr/enc_key"}
NEXTAUTH_SECRET=${config.sops.placeholder."homarr/nextauth_secret"}
AUTH_PROVIDERS=oidc
AUTH_OIDC_CLIENT_ID=${config.sops.placeholder."homarr/client_id"}
AUTH_OIDC_CLIENT_SECRET=${config.sops.placeholder."homarr/client_secret"}
AUTH_OIDC_ISSUER=${oidpDomain}
AUTH_OIDC_CLIENT_NAME="Pocket ID"
AUTH_OIDC_SCOPE_OVERWRITE=openid email profile groups
AUTH_OIDC_GROUPS_ATTRIBUTE=groups
AUTH_LOGOUT_REDIRECT_URL=${oidpDomain}
AUTH_OIDC_AUTO_LOGIN=true
'';
};
};
}