Hi!
I’m using flake with home-manager.
This is my flake config:
{
description = "jeansib's flake";
inputs = {
nixpkgs-unstable = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
nixpkgs-24-11 = {
url = "github:nixos/nixpkgs/nixos-24.11";
};
nix-flatpak = {
url = "github:gmodena/nix-flatpak/";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
};
outputs = { self, nixpkgs-unstable, nixpkgs-24-11, nix-flatpak, home-manager, ... }@inputs:
let
system = "x86_64-linux";
in
{
defaultPackage.x86_64-linux = home-manager.defaultPackage.x86_64-linux;
homeConfigurations = {
"jeansib" = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = {
pkgs-unstable = import nixpkgs-unstable {
inherit system;
};
pkgs-24-11 = import nixpkgs-24-11 {
inherit system;
};
inherit inputs;
};
pkgs = import nixpkgs-unstable { inherit system; };
};
modules = [
nix-flatpak.nixosModules.nix-flatpak
./home.nix
];
};
};
}
This is my home.nix file:
{config, pkgs, inputs, nix-flatpak, ...}:
{
nixpkgs = {
config = {
allowUnfree = true;
# allowUnsupportedSystem = true;
};
};
home = {
stateVersion = "24.11";
username = "jeansib";
homeDirectory = "/home/jeansib";
packages = with pkgs; [
vscodium
onedrive
musescore
syncthing
libreoffice
vlc
rpi-imager
mindustry-wayland
teams-for-linux
lua
pdfmixtool
protonvpn-gui
protonmail-desktop
proton-pass
];
};
}
(omitted some systemd units as they are irrelevant)
When I run home-manager switch
, I get the following error:
[jeansib@dell-3:~/.config/home-manager]$ home-manager switch
error:
… while evaluating a branch condition
at /nix/store/7hw19rbs6p20l2gxbf13la04pcs2znmz-source/lib/lists.nix:125:9:
124| fold' = n:
125| if n == len
| ^
126| then nul
… while calling the 'length' builtin
at /nix/store/7hw19rbs6p20l2gxbf13la04pcs2znmz-source/lib/lists.nix:123:13:
122| let
123| len = length list;
| ^
124| fold' = n:
… while evaluating the option `programs.firefox.vendorPath':
… while evaluating the module argument `pkgs' in "/nix/store/alm3nymx19kvkc8my31niws5d81b9pri-source/modules/programs/firefox.nix:anon-1":
… while evaluating the module argument `pkgsPath' in "/nix/store/alm3nymx19kvkc8my31niws5d81b9pri-source/modules/misc/nixpkgs.nix":
… while evaluating the option `home.stateVersion':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: The option `home.stateVersion' was accessed but has no value defined. Try setting the option.
[jeansib@dell-3:~/.config/home-manager]$
But home.stateVersion is clearly set in my home.nix file. What does it mean? Why it throws that error?