I just set up home-manager as a module via flake and everything seems to work, but I get a warning everytime I run “sudo nixos-rebuild switch”:
evaluation warning: lain profile: You are using
Home Manager version 25.11 and
Nixpkgs version 25.05.
Using mismatched versions is likely to cause errors and unexpected
behavior. It is therefore highly recommended to use a release of Home
Manager that corresponds with your chosen release of Nixpkgs.
If you insist then you can disable this warning by adding
home.enableNixpkgsReleaseCheck = false;
to your configuration.
I tried following the suggestion and specified the home-manager release in my flake.nix:
After sudo nix flake update and sudo nixos-rebuild switch I get a new error:
building the system configuration...
error:
… while calling the 'head' builtin
at /nix/store/hr5pl7m833kkr0zv98iydy7mxyl10qld-source/lib/attrsets.nix:1571:13:
1570| if length values == 1 || pred here (elemAt values 1) (head values) then
1571| head values
| ^
1572| else
… while evaluating the attribute 'value'
at /nix/store/hr5pl7m833kkr0zv98iydy7mxyl10qld-source/lib/modules.nix:1083:7:
1082| // {
1083| value = addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
1084| inherit (res.defsFinal') highestPrio;
… while evaluating the option `system.build.toplevel':
… while evaluating definitions from `/nix/store/hr5pl7m833kkr0zv98iydy7mxyl10qld-source/nixos/modules/system/activation/top-level.nix':
… while evaluating the option `assertions':
… while evaluating definitions from `/nix/store/a4la088hi5id7sw77gy9zdvwn83dgczz-source/nixos/common.nix':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: The option `home-manager.users.lain.programs.git.settings' does not exist. Definition values:
- In `/nix/store/sxkw0l6qlfd043siqwlyljivw94vil6h-source/home.nix':
{
credential = {
helper = "libsecret";
};
user = {
...
This didn’t happen when in the flake.nix home-manager url was set as url = "github:nix-community/home-manager";
The error that you get is telling you that the option “programs.git.settings”, that you use, doesn’t exist. I just checked and indeed this option does not exist in release-25.05 of home manager.
It worked before because you used the recent unstable release that includes that option.
I hope this is clear. You have three options, ignore the warning and mix home manager unstable with nixos release 25.05, switch to unstable or remove that option.
Oh, I see, thanks for clarification.
I was confused because the wiki specifies the 25.05 release, but then in the Usage section, it shows “programs.git.settings”. That seemed a bit misleading to me…