Thank you, @VTimofeenko. You pointed me in the right direction. I did not have to use home-manager.extraSpecialArgs though, by some reason specialArgs is sufficient. Maybe inputs and outputs are adutomatically passed on to home-manager? I found out that there was defined an overlay in configuration.nix, and this overwrote the overlay array. That is why the overlay was not applied.
To summarise:
-
flake.nix - inputs:
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; -
flake.nix - outputs (in the
in { }block):
unstable-packages = final: _prev: {
unstable = import inputs.nixpkgs-unstable {
system = final.system;
config.allowUnfree = true;
};
};
- configuration.nix (imported by home.nix):
nixpkgs.overlays = [
outputs.unstable-packages
];
- home.nix:
home.packages = with pkgs; [
unstable.hyprlock
];