Unstable channel - undefined variable 'unstable'

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:

  1. flake.nix - inputs:
    nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";

  2. flake.nix - outputs (in the in { } block):

        unstable-packages = final: _prev: {
            unstable = import inputs.nixpkgs-unstable {
                system = final.system;
                config.allowUnfree = true;
            };
        };
  1. configuration.nix (imported by home.nix):
    nixpkgs.overlays = [
            outputs.unstable-packages
     ];
  1. home.nix:
    home.packages = with pkgs; [
        unstable.hyprlock
    ];