feat: add kanidm patch to allow provisioning, fix grafana hash from upstream

This commit is contained in:
oddlama 2023-08-27 15:49:29 +02:00
parent e5d8c1f74a
commit 0389e98dd9
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
2 changed files with 26 additions and 1 deletions

View file

@ -10,6 +10,7 @@
flip flip
mapAttrs mapAttrs
mdDoc mdDoc
mkDefault
mkEnableOption mkEnableOption
mkIf mkIf
mkOption mkOption
@ -103,7 +104,9 @@ in {
# reuses refresh tokens but kanidm forbids that. Not sure though. # reuses refresh tokens but kanidm forbids that. Not sure though.
#cookie.refresh = "5m"; #cookie.refresh = "5m";
cookie.expire = "30m"; cookie.expire = "30m";
cookie.secret = mkDefault null;
clientSecret = mkDefault null;
reverseProxy = true; reverseProxy = true;
httpAddress = "unix:///run/oauth2_proxy/oauth2_proxy.sock"; httpAddress = "unix:///run/oauth2_proxy/oauth2_proxy.sock";
redirectURL = "https://${cfg.portalDomain}/oauth2/callback"; redirectURL = "https://${cfg.portalDomain}/oauth2/callback";

View file

@ -2,6 +2,28 @@
(import ./caddy.nix) (import ./caddy.nix)
(import ./oauth2-proxy) (import ./oauth2-proxy)
(self: super: { (self: super: {
kanidm-secret-manipulator = self.callPackage ./kanidm-secret-manipulator.nix {}; grafana = super.grafana.overrideAttrs (finalAttrs: previousAttrs: {
srcStatic = super.fetchurl {
url = "https://dl.grafana.com/oss/release/grafana-${previousAttrs.version}.linux-amd64.tar.gz";
hash = "sha256-QFRahjDyL7BNikK2cCsFLfu4/odDbkCxplf6f7yCezE=";
};
});
kanidm-secret-manipulator = super.callPackage ./kanidm-secret-manipulator.nix {};
kanidm = super.kanidm.overrideAttrs (finalAttrs: previousAttrs: {
patches = [
(super.fetchpatch {
name = "group-list-json-output.patch";
url = "https://patch-diff.githubusercontent.com/raw/kanidm/kanidm/pull/2016.patch";
hash = "sha256-gc75KBzhth4fZvuvRa3Rjg1J7DIGy25mzUPCf2aha80=";
})
(super.fetchpatch {
name = "person-and-oauth-json-output.patch";
url = "https://patch-diff.githubusercontent.com/raw/kanidm/kanidm/pull/2017.patch";
hash = "sha256-fZgJ7dY2LHvBi64A/6o7kfArUAsLqjWRRpH2q1GL5ic=";
})
];
doCheck = false;
});
}) })
] ]