The media upload feature is build around being deployed in a container and only enables uploads when `/media` is a mountpoint. This isn't the case on nixos and as such media uploads are disable. In order to enable this, we need to patch authentik so that the `can_save_media` capability is enabled.
21 lines
693 B
Nix
21 lines
693 B
Nix
{ authentik-src
|
|
, authentikComponents
|
|
, linkFarm
|
|
, applyPatches
|
|
}:
|
|
let
|
|
patched-src = applyPatches {
|
|
src = authentik-src;
|
|
name = "patched-authentik-source";
|
|
patches = [ ./authentik_media_upload.patch ];
|
|
};
|
|
in
|
|
linkFarm "authentik-static-workdir-deps" [
|
|
{ name = "authentik"; path = "${patched-src}/authentik"; }
|
|
{ name = "locale"; path = "${authentik-src}/locale"; }
|
|
{ name = "blueprints"; path = "${authentik-src}/blueprints"; }
|
|
{ name = "internal"; path = "${authentik-src}/internal"; }
|
|
{ name = "lifecycle"; path = "${authentik-src}/lifecycle"; }
|
|
{ name = "schemas"; path = "${authentik-src}/schemas"; }
|
|
{ name = "web"; path = authentikComponents.frontend; }
|
|
]
|