Ok I have been trying to get this sorted for some time. I keep running into this everytime. When I install home manager and flakes eventually Ill get this error
error: The option `home-manager.users.webb.home.stateVersion' is used but not defined.
Or this error
error: home state version is used but not defined
my channels are
[webb@nixos:~]$ nix-channel --list
nixos nixos-unstable release nixos-23.11pre495256.04af42f3b31
[sudo] password for webb:
home-manager https://github.com/nix-community/home-manager/archive/master.tar.gz
nixos nixos-unstable release nixos-23.11pre495256.04af42f3b31
I have a feeling my channels may be the issue. I remember something about not needing both root and user with channel.also when Im installing home manager as module I notice dont get the files I use to . before after adding channels and updating switch I would get the home-manager/home.nix files.
My config
> { config, pkgs, ... }:
>
> {
> imports =
> [ # Include the results of the hardware scan.
> <home-manager/nixos>
> ./hardware-configuration.nix
> ];
>
> # Bootloader.
> boot.loader.systemd-boot.enable = true;
> boot.loader.efi.canTouchEfiVariables = true;
> boot.loader.efi.efiSysMountPoint = "/boot/efi";
>
> networking.hostName = "nixos"; # Define your hostname.
> # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
>
> # Configure network proxy if necessary
> # networking.proxy.default = "http://user:password@proxy:port/";
> # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
> users.users.webb.isNormalUser = true;
> home-manager.users.webb = { pkgs, ... }: {
> home.packages = [ pkgs.atool pkgs.httpie ];
> programs.bash.enable = true;
> };
> # Enable networking
> networking.networkmanager.enable = true;
>
> # Set your time zone.
> time.timeZone = "America/Los_Angeles";
>
> # Select internationalisation properties.
> i18n.defaultLocale = "en_US.UTF-8";
>
> i18n.extraLocaleSettings = {
> LC_ADDRESS = "en_US.UTF-8";
> LC_IDENTIFICATION = "en_US.UTF-8";
> LC_MEASUREMENT = "en_US.UTF-8";
> LC_MONETARY = "en_US.UTF-8";
> LC_NAME = "en_US.UTF-8";
> LC_NUMERIC = "en_US.UTF-8";
> LC_PAPER = "en_US.UTF-8";
> LC_TELEPHONE = "en_US.UTF-8";
> LC_TIME = "en_US.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 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;
> # If you want to use JACK applications, uncomment this
> #jack.enable = true;
>
> # use the example session manager (no others are packaged yet so this is enabled by default,
> # no need to redefine it in your config for now)
> #media-session.enable = true;
> };
> # Define a user account. Don't forget to set a password with ‘passwd’.
>
>
> # Allow unfree packages
> nixpkgs.config.allowUnfree = true;
>
> # List packages installed in system profile. To search, run:
> # $ nix search wget
> environment.systemPackages = with pkgs; [
>
> # Terminal programs
> xplr helix fzf tldr alacritty wezterm zsh espanso fd
>
> # Internet stuff
> chromium discord git
> nnn findimagedupes krusader hyprland hyprland-protocols dolphin sof-firmware zellij zip github-desktop unar pick skim bat waydroid vkdt-wayland xdg-desktop-portal
> noto-fonts-cjk
> noto-fonts-emoji
>
> ];
> # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
> system.stateVersion = "22.11"; # Did you read the comment?
>
> }
Blockquote
Im also mixxing other folders like nix/nix.conf.