diff --git a/packages/part.nix b/packages/part.nix index 7823eae..c57ef79 100644 --- a/packages/part.nix +++ b/packages/part.nix @@ -9,6 +9,7 @@ in { ./projects.nix ./patched-inputs.nix ./catalog + ./shadows.nix ]; perSystem = { pkgs, self', system, ... }: let patched-derivations = import ./patched-derivations.nix (pkgs // { flakePackages = self'.packages; }); diff --git a/packages/shadows.nix b/packages/shadows.nix new file mode 100644 index 0000000..5ae7ec7 --- /dev/null +++ b/packages/shadows.nix @@ -0,0 +1,19 @@ +{ lib, ... }: + +{ + perSystem = { inputs', self', ... }: { + # much like overlays, shadows can *shadow* packages in nixpkgs + # unlike overlays, shadows don't cause a nixpkgs re-evaluation + # this is a hack for dealing with poorly written NixOS modules + # that don't provide a `package` option to perform overrides + + options.shadows = lib.mkOption { + type = with lib.types; lazyAttrsOf package; + default = { + inherit (self'.packages) + kanidm + ; + }; + }; + }; +}