Temp fix for Authentik
All checks were successful
Auto Update Build / build (pull_request) Successful in 35m5s

Waiting for PR https://github.com/nix-community/authentik-nix/pull/86
This commit is contained in:
pazpi 2026-01-19 13:05:07 +01:00
parent 625c0e0367
commit edf5f148f6
4 changed files with 52 additions and 39 deletions

38
flake.lock generated
View file

@ -30,7 +30,9 @@
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"napalm": "napalm", "napalm": "napalm",
"nixpkgs": "nixpkgs", "nixpkgs": [
"nixpkgs"
],
"pyproject-build-systems": "pyproject-build-systems", "pyproject-build-systems": "pyproject-build-systems",
"pyproject-nix": "pyproject-nix", "pyproject-nix": "pyproject-nix",
"systems": "systems_2", "systems": "systems_2",
@ -53,16 +55,16 @@
"authentik-src": { "authentik-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1765907481, "lastModified": 1768494865,
"narHash": "sha256-d0pPNE2T30COdFse0T15Mx8XW4BGg8hgPQvmW2dAV9s=", "narHash": "sha256-VeROJ72UbzKnEJz8pDXYDtbI/XV9KKGaBQ8N41uEaAA=",
"owner": "goauthentik", "owner": "goauthentik",
"repo": "authentik", "repo": "authentik",
"rev": "0d617e4ad1eb9e4540ba5381e6ce06e971affc63", "rev": "bcefa8b7a138850e9a50f8f124bd3e3853467da7",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "goauthentik", "owner": "goauthentik",
"ref": "version/2025.10.3", "ref": "version-2025.10",
"repo": "authentik", "repo": "authentik",
"type": "github" "type": "github"
} }
@ -374,16 +376,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1765779637, "lastModified": 1768323494,
"narHash": "sha256-KJ2wa/BLSrTqDjbfyNx70ov/HdgNBCBBSQP3BIzKnv4=", "narHash": "sha256-yBXJLE6WCtrGo7LKiB6NOt6nisBEEkguC/lq/rP3zRQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1306659b587dc277866c7b69eb97e5f07864d8c4", "rev": "2c3e5ec5df46d3aeee2a1da0bfedd74e21f4bf3a",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixos-25.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -419,22 +421,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1768323494,
"narHash": "sha256-yBXJLE6WCtrGo7LKiB6NOt6nisBEEkguC/lq/rP3zRQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2c3e5ec5df46d3aeee2a1da0bfedd74e21f4bf3a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"pyproject-build-systems": { "pyproject-build-systems": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -493,7 +479,7 @@
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"lix-module": "lix-module", "lix-module": "lix-module",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable" "nixpkgs-unstable": "nixpkgs-unstable"
} }
}, },

View file

@ -38,6 +38,10 @@
authentik-nix = { authentik-nix = {
url = "github:nix-community/authentik-nix"; url = "github:nix-community/authentik-nix";
# Waiting for PR https://github.com/nix-community/authentik-nix/pull/86
inputs.nixpkgs.follows = "nixpkgs";
inputs.authentik-src.url = "github:goauthentik/authentik/version-2025.10";
}; };
}; };

View file

@ -71,7 +71,7 @@ let
hostModule = cfg.module; hostModule = cfg.module;
unstable = cfg.unstable or false; unstable = cfg.unstable or false;
extraModules = cfg.extraModules or [ ]; extraModules = cfg.extraModules or [ ];
specialArgs = cfg.specialArgs or { }; specialArgs = { inherit authentik-nix; } // (cfg.specialArgs or { });
} }
) hostDefs; ) hostDefs;

View file

@ -2,6 +2,7 @@
lib, lib,
config, config,
pkgs, pkgs,
authentik-nix,
... ...
}: }:
let let
@ -90,8 +91,30 @@ in
config = lib.mkMerge [ config = lib.mkMerge [
(lib.mkIf cfg.enable { (lib.mkIf cfg.enable {
services.authentik = { services.authentik =
# Waiting for PR https://github.com/nix-community/authentik-nix/pull/86
let
customAuthentikScope = authentik-nix.lib.mkAuthentikScope {
inherit pkgs;
};
# Override the scope to change gopkgs
overriddenScope = customAuthentikScope.overrideScope (
final: prev: {
authentikComponents = prev.authentikComponents // {
gopkgs = prev.authentikComponents.gopkgs.override {
buildGo124Module = pkgs.buildGo125Module;
};
};
}
);
in
{
enable = true; enable = true;
# Waiting for PR https://github.com/nix-community/authentik-nix/pull/86
inherit (overriddenScope) authentikComponents;
environmentFile = cfg.envFile; environmentFile = cfg.envFile;
settings = { settings = {
email = cfg.email; email = cfg.email;