Error: The option `home-manager' does not exist

When I “rebuild boot”
I get the error
The option home-manager does not exist

The strange thing is I do NOT get this error when I “rebuild switch”

sudo nixos-rebuild boot
[sudo] password for shmuel: 
error:
       … while evaluating the attribute 'config'

         at /nix/store/w32q3g74wgk09516kda5niyi5frxh49m-nixos/nixos/lib/modules.nix:322:9:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          323|         _module = checked (config._module);

       … while calling the 'seq' builtin

         at /nix/store/w32q3g74wgk09516kda5niyi5frxh49m-nixos/nixos/lib/modules.nix:322:18:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          323|         _module = checked (config._module);

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: The option `home-manager' does not exist. Definition values:
       - In `/home/shmuel/nixos/configuration.nix':
           {
             users = {
               shmuel = {
                 home = {
                   stateVersion = "24.05";
           ...
building Nix...
error:
       … while evaluating the attribute 'config'

         at /nix/store/w32q3g74wgk09516kda5niyi5frxh49m-nixos/nixos/lib/modules.nix:322:9:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          323|         _module = checked (config._module);

       … while calling the 'seq' builtin

         at /nix/store/w32q3g74wgk09516kda5niyi5frxh49m-nixos/nixos/lib/modules.nix:322:18:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          323|         _module = checked (config._module);

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: The option `home-manager' does not exist. Definition values:
       - In `/home/shmuel/nixos/configuration.nix':
           {
             users = {
               shmuel = {
                 home = {
                   stateVersion = "24.05";
           ...
building the system configuration...
error:
       … while evaluating the attribute 'config.system.build.toplevel'

         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:9:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          323|         _module = checked (config._module);

       … while calling the 'seq' builtin

         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:18:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          323|         _module = checked (config._module);

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: The option `home-manager' does not exist. Definition values:
       - In `/home/shmuel/nixos/configuration.nix':
           {
             users = {
               shmuel = {
                 home = {
                   stateVersion = "23.11";

This is my nix config

sudo nixos-rebuild boot
[sudo] password for shmuel: 
error:
       … while evaluating the attribute 'config'

         at /nix/store/w32q3g74wgk09516kda5niyi5frxh49m-nixos/nixos/lib/modules.nix:322:9:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          323|         _module = checked (config._module);

       … while calling the 'seq' builtin

         at /nix/store/w32q3g74wgk09516kda5niyi5frxh49m-nixos/nixos/lib/modules.nix:322:18:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          323|         _module = checked (config._module);

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: The option `home-manager' does not exist. Definition values:
       - In `/home/shmuel/nixos/configuration.nix':
           {
             users = {
               shmuel = {
                 home = {
                   stateVersion = "23.11";
           ...
building Nix...
error:
       … while evaluating the attribute 'config'

         at /nix/store/w32q3g74wgk09516kda5niyi5frxh49m-nixos/nixos/lib/modules.nix:322:9:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          323|         _module = checked (config._module);

       … while calling the 'seq' builtin

         at /nix/store/w32q3g74wgk09516kda5niyi5frxh49m-nixos/nixos/lib/modules.nix:322:18:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          323|         _module = checked (config._module);

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: The option `home-manager' does not exist. Definition values:
       - In `/home/shmuel/nixos/configuration.nix':
           {
             users = {
               shmuel = {
                 home = {
                   stateVersion = "23.11";
           ...
building the system configuration...
error:
       … while evaluating the attribute 'config.system.build.toplevel'

         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:9:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          323|         _module = checked (config._module);

       … while calling the 'seq' builtin

         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:18:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          323|         _module = checked (config._module);

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: The option `home-manager' does not exist. Definition values:
       - In `/home/shmuel/nixos/configuration.nix':
           {
             users = {
               shmuel = {
                 home = {
                   stateVersion = "23.11";

and this is my home config

#Home Manager with zsh and oh-my-zsh
#for Plasma configuration, use konsave. To apply a profile: konsave -a <profile name>

{ pkgs, ... }: {
  home.username = "shmuel";
  home.homeDirectory = "/home/shmuel";
  programs.home-manager.enable = true;
  programs.zsh.initExtra = "neofetch|lolcat";
  home.packages = with pkgs; [
    pkgs.oh-my-zsh
    pkgs.neofetch
    pkgs.lolcat
    pkgs.zsh-autosuggestions
     ];


  programs.zsh = {
   enable = true;
   enableAutosuggestions = true;

   shellAliases = {
    ll = "ls -l";
    bild = "sudo nixos-rebuild switch --flake ~/nixos#nixos";
    up = "sudo nix-channel --update && sudo nixos-rebuild switch --flake ~/nixos#nixos";
    config = "nano ~/nixos/configuration.nix";
    hom = "nano ~/nixos/home.nix";

  };
};
programs.zsh.oh-my-zsh = {
  enable = true;
  plugins = [  ];
  theme = "agnoster";
};
}

  #add home manager channel
#sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
#sudo nix-channel --update

This is my flakes config

{
    inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
    home-manager.url = "github:nix-community/home-manager";
    home-manager.inputs.nixpkgs.follows = "nixpkgs";
    nix-snapd.url = "github:io12/nix-snapd";
    nix-snapd.inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs = { self, nixpkgs, home-manager, nix-snapd }: {

    nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
      ./configuration.nix
      home-manager.nixosModules.home-manager
      nix-snapd.nixosModules.default

      {
    home-manager.useGlobalPkgs = true;
    home-manager.useUserPackages = true;
    home-manager.users.shmuel = import ./home.nix;
    services.snap.enable = true;
  }
      ];

    };
  };
}

So really the issue is that I am using the wrong command for a flakes config.
I need to “rebuild boot” the same way that I “rebuild switch”.