How to upgrade packages declared in Home Manager when used as a NixOS module in a flake?

I’m using Home Manager as a NixOS module in a flake, as per these instructions, but I can’t figure how to upgrade the packages declared inside home-manager.nixosModules.home-manager.home-manager.users.<name>.home.packages.

Both nix-channel --update and nix flake update do some work and succeed when invoked, but the packages declared inside home-manager aren’t getting upgraded. Seems like I need to somehow hook pkgs in the flake’s input to have nix flake update consider them? Thanks in advance for any hints.

Here’s an abstract of my system’s flake.nix:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";

    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { self, nixpkgs, home-manager, ... }: {
    nixosConfigurations.lemur = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules =
        [ ({ pkgs, ... }: {

            imports =[ /home/alpeb/nixos-flake-lemur/hardware-configuration.nix ];

            # bunch of ommitted config...

            users.users.alpeb = {
               isNormalUser = true;
               description = "alpeb";
               extraGroups = [ "networkmanager" "wheel" "docker" ];
            };

            nixpkgs.config.allowUnfree = true;
          
            environment.systemPackages = with pkgs; [
              curl wget tree xclip pinentry-curses
              gnomeExtensions.gtile gnomeExtensions.dash-to-panel
            ];
          
            system.stateVersion = "22.11";
          })

          home-manager.nixosModules.home-manager {
              home-manager = {
                useGlobalPkgs = true;
                useUserPackages = true;
                users.alpeb = { pkgs, ...}: {
                  home.stateVersion = "22.11";
                  home.packages = with pkgs; [
                    (import ./pkgs/aws-cli)

                    # more ommitted imports here

                    (writeShellScriptBin "flush-cluster" (builtins.readFile ./scripts/flush-cluster.sh))

                    google-chrome firefox appimage-run tilix neofetch zoom-us keepassxc
                    # lots of other ommitted packages that aren't getting updated
                  ];

                  programs = {
                    bash = import ./bash.nix;
                    git = import ./git.nix;
                    neovim = import ./vim/vim.nix;
                    tmux = import ./tmux.nix;
                  };
                };
              };
            }
        ];
      };
  };
}

Assuming you run nix flake update /home/alpeb/nixos-flake-lemur to get your package infos up to date, you need to do a nixos-rebuild switch --flake /home/alpeb/nixos-flake-lemur#lemur to build a new generation with the updated packages and then switch to it.

Thanks! It appears I wasn’t passing the directory to nix flake update, and now it works!