1
0
Fork 0
forked from lukas/nixos-config
nixos-config/hosts/blunix/localServices/headscale.nix
pijukka 7b848a54bf secrets: rotate Headscale OIDC credential
Replace the last active credential that still matched the leaked history. Restart Dex and Headscale automatically when their encrypted agenix source files change.
2026-07-28 02:47:18 +02:00

31 lines
679 B
Nix

{config, pkgs, lib, ...}:
{
services.headscale = {
enable = true;
port = 3001;
settings = {
server_url = "https://head.${config.domain}";
dns.base_domain = "hn.${config.domain}";
dns.nameservers.global = [ config.tailnetIPs.blunix ];
logtail.enabled = false;
oidc = {
client_id = "headscale";
client_secret_path = config.age.secrets.oidcHeadscale.path;
issuer = "https://dex.${config.domain}/dex";
scope = [
"openid"
"profile"
"email"
"groups"
];
allowed_groups = [ "intern" ];
};
};
};
systemd.services.headscale.restartTriggers = [
config.age.secrets.oidcHeadscale.file
];
}