Need help setting home-manager

Here’s my flake.nix:

{
  description = "A simple NixOS flake";

  inputs = {
    nixpkgs.url = "github:NixOs/nixpkgs/nixos-23.11";

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

  outputs = { nixpkgs, home-manager, ... }@inputs:
    let
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages.${system};
    in
    {
      nixosConfigurations.aipc = nixpkgs.lib.nixosSystem {
        extraSpecialArgs = { inherit inputs; };
        modules = [
          ./configuration.nix
          inputs.home-manager.nixosModules.default
        ];
      };
    };
}

Here’s my configuration.nix:

# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, inputs, ... }:
{
  imports = [
      ./hardware-configuration.nix
      ./nvidia_gpu.nix
      # ./cachix.nix 
      # <home-manager/nixos>
    ];

  # Bootloader.
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  networking.hostName = "aipc"; # Define your hostname.

  # Enable networking
  networking.networkmanager.enable = true;

  # Steam
  programs.gamemode.enable = true;
  programs.steam.enable = true;
  hardware.opengl = {
    enable = true;
    setLdLibraryPath = true;
  };

  # Set your time zone.
  time.timeZone = "Europe/Moscow";

  # Select internationalisation properties.
  i18n.defaultLocale = "en_US.UTF-8";

  i18n.extraLocaleSettings = {
    LC_ADDRESS = "ru_RU.UTF-8";
    LC_IDENTIFICATION = "ru_RU.UTF-8";
    LC_MEASUREMENT = "ru_RU.UTF-8";
    LC_MONETARY = "ru_RU.UTF-8";
    LC_NAME = "ru_RU.UTF-8";
    LC_NUMERIC = "ru_RU.UTF-8";
    LC_PAPER = "ru_RU.UTF-8";
    LC_TELEPHONE = "ru_RU.UTF-8";
    LC_TIME = "ru_RU.UTF-8";
  };

  # Enable the X11 windowing system.
  services.xserver.enable = true;

  # Enable the KDE Plasma Desktop Environment.
  services.xserver.displayManager.sddm.enable = true;
  services.xserver.desktopManager.plasma5.enable = true;

  # Configure keymap in X11
  services.xserver = {
    layout = "us";
    xkbVariant = "";
  };

  # Enable CUPS to print documents.
  services.printing.enable = true;

  # Enable sound with pipewire.
  sound.enable = true;
  hardware.pulseaudio.enable = false;
  security.rtkit.enable = true;
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
  };

  # Enable touchpad support (enabled default in most desktopManager).
  # services.xserver.libinput.enable = true;

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users.sv-cheats-1 = {
    isNormalUser = true;
    description = "sv-cheats-1";
    extraGroups = [ "networkmanager" "wheel" ];
    packages = with pkgs; [
      firefox
      kate
      vscode
      htop
      btop
      telegram-desktop
      nvtop
      git
      ncdu

      tor-browser-bundle-bin

      oh-my-zsh
      zsh-completions

      qbittorrent
      lutris
      wineWowPackages.stable
      winetricks

      lazygit
    ]; 
    shell = pkgs.zsh;
  };

  # ZSH
  programs.zsh = {
    enable = true;
    ohMyZsh = {
      enable = true;
      plugins = [ "git" ];
      theme = "fino";
    };
  };

  # # Git
  # programs.git  = {
  #   enable = true;
  #   
  #   config = {
  #     userName = "Alexey Tkachenko";
  #     userEmail = "a.tkachenko@innopolis.university";
  #
  #     aliases = {
  #       s = "status";
  #       ci = "commit";
  #       c = "checkout";
  #     };
  #   };
  # };

  # Allow unfree packages
  nixpkgs.config.allowUnfree = true;

  # List packages installed in system profile. To search, run:
  # $ nix search wget
  environment.systemPackages = with pkgs; [
    vim neovim
    xclip # wl-paste
    home-manager

    gnumake gcc

    ranger
  ];
  environment.sessionVariables = {
      EDITOR = "nvim";
  };

  # Some programs need SUID wrappers, can be configured further or are
  # started in user sessions.
  # programs.mtr.enable = true;
  # programs.gnupg.agent = {
  #   enable = true;
  #   enableSSHSupport = true;
  # };

  # List services that you want to enable:

  # Enable the OpenSSH daemon.
  services.openssh.enable = false;

  # Open ports in the firewall.
  # networking.firewall.allowedTCPPorts = [ ... ];
  # networking.firewall.allowedUDPPorts = [ ... ];
  # Or disable the firewall altogether.
  # networking.firewall.enable = false;

  system.stateVersion = "23.11"; # Don't change 

  # Nix flakes
  nix.settings.experimental-features = [ "nix-command" "flakes" ];
}

Here’s my home.nix:

{ config, pkgs, ... }:

{
  home.username = "sv-cheats-1";
  home.homeDirectory = "/home/sv-cheats-1";

  # Packages that should be installed to the user profile.
  home.packages = with pkgs; [
    firefox
    kate
    vscode
    htop
    btop
    telegram-desktop
    nvtop
    git
    ncdu
  
    tor-browser-bundle-bin
  
    oh-my-zsh
    zsh-completions
  
    qbittorrent
    lutris
    wineWowPackages.stable
    winetricks
  
    neofetch
  ];

  # basic configuration of git, please change to your own
  programs.git = {
    enable = true;
    userName = "Alexey Tkachenko";
    userEmail = "a.tkachenko@innopolis.university";
  };

  # alacritty - a cross-platform, GPU-accelerated terminal emulator
  programs.alacritty = {
    enable = true;
    # custom settings
    settings = {
      env.TERM = "xterm-256color";
      font = {
        size = 12;
        draw_bold_text_with_bright_colors = true;
      };
      scrolling.multiplier = 5;
      selection.save_to_clipboard = true;
    };
  };

  # ZSH
  programs.zsh = {
    enable = true;
    ohMyZsh = {
      enable = true;
      plugins = [ "git" ];
      theme = "fino";
    };
  };

  # This value determines the home Manager release that your
  # configuration is compatible with. This helps avoid breakage
  # when a new home Manager release introduces backwards
  # incompatible changes.
  #
  # You can update home Manager without changing this value. See
  # the home Manager release notes for a list of state version
  # changes in each release.
  home.stateVersion = "23.11";

  # Let home Manager install and manage itself.
  programs.home-manager.enable = true;
}

When I run:

sudo nixos-rebuild test --option eval-cache false

I get the following:

error:
       … from call site

         at /nix/store/pfc56yr7y3wflvbgnrpscf2n1m4j3xd7-source/flake.nix:23:11:

           22|         nixosSystem = args:
           23|           import ./nixos/lib/eval-config.nix (
             |           ^
           24|             {

       error: function 'anonymous lambda' called with unexpected argument 'extraSpecialArgs'

       at /nix/store/pfc56yr7y3wflvbgnrpscf2n1m4j3xd7-source/nixos/lib/eval-config.nix:11:1:

           10| # types.submodule instead of using eval-config.nix
           11| evalConfigArgs@
             | ^
           12| { # !!! system can be set modularly, would be nice to remove,

I’m new to NixOS, so I don’t really know how to debug this stuff. I’ve been banging my head against my keyboard for 5 hours straight trying to fix this. Any help is welcome!

In NixOS configuration it’s specialArgs, not extraSpecialArgs (which is for Home Manager). This can be seen in nixos/lib/eval-config.nix.