klt
April 28, 2023, 8:27am
1
nixos-rebuild test
throws an exception but it did not change any of the configuration files on which the current run has been build:
building Nix...
building the system configuration...
error: attribute 'extend' missing
at /nix/store/bmxyjabn7zj054239gyx3kga44wi8v91-source/modules/lib/stdlib-extended.nix:7:4:
6| let mkHmLib = import ./.;
7| in nixpkgsLib.extend (self: super: {
| ^
8| hm = mkHmLib { lib = self; };
Did you mean extends?
I would like to modify my configuration but before doing so I test whether the current one still compiles.
Here some information about my machine:
~ nix-info -m
- system: `"x86_64-linux"`
- host os: `Linux 6.2.6, NixOS, 22.11 (Raccoon), 22.11.3196.cd34d6ed7ba`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.11.1`
- channels(root): `"home-manager-22.11.tar.gz, nixos-22.11"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
Is this a new bug or rather an error in my settings?
Here my configuration:
https://codeberg.org/klt/configurations/src/branch/main/nixos
Same problem here when trying to nixos-rebuild switch --flake .#host
- system: `"x86_64-linux"`
- host os: `Linux 6.2.10, NixOS, 22.11 (Raccoon), 22.11.20230412.87edbd7`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.11.1`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
there is a similar bug report in the upstream repository, are you using the same branch of home manager and nixpkgs?
opened 11:07AM - 28 Apr 23 UTC
closed 11:08AM - 28 Apr 23 UTC
bug
triage
### Are you following the right branch?
- [X] My Nixpkgs and Home Manager versi… ons are in sync
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Issue description
I'm using NixOS stable 22.11 and HM installed as a NixOS module in a single flake. After upgrading both nixpkgs and HM, I started seeing an error in stdlib-extended.nix from HM.
```
• Updated input 'home-manager':
'github:nix-community/home-manager/bf5712c5865e543fb3f4796511d4cf51efd841b1' (2023-03-11)
→ 'github:nix-community/home-manager/43ba4489bd3f9f69519f5f7ebdb76d0455eccbbe' (2023-04-28)
• Removed input 'home-manager/utils'
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/5eb98948b66de29f899c7fe27ae112a47964baf8' (2023-03-11)
→ 'github:NixOS/nixpkgs/15b75800dce80225b44f067c9012b09de37dfad2' (2023-04-26)
```
Started throwing this error:
```
error: attribute 'extend' missing
at /nix/store/bmxyjabn7zj054239gyx3kga44wi8v91-source/modules/lib/stdlib-extended.nix:7:4:
6| let mkHmLib = import ./.;
7| in nixpkgsLib.extend (self: super: {
| ^
8| hm = mkHmLib { lib = self; };
Did you mean extends?
```
Seems to make sense, as nixpkgs has had `extends` [for a long time](https://github.com/NixOS/nixpkgs/blame/nixos-22.11/lib/default.nix#L76) and at least in the nixos-22.11 branch, those exports for `nixpkgs.lib` haven't changed in the past 3 months.
### Maintainer CC
_No response_
### System information
```markdown
- system: `"x86_64-linux"`
- host os: `Linux 6.1.16, NixOS, 22.11 (Raccoon), 22.11.20230311.5eb9894`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.11.1`
- channels(root): `"home-manager, nixos"`
- channels(kuba): `"home-manager, nixpkgs"`
- nixpkgs: `/home/kuba/.nix-defexpr/channels/nixpkgs`
```
1 Like
klt
April 28, 2023, 4:29pm
4
Hello @figsoda , I am not sure how to answer your question.
I guess that I follow master for home-manager:
let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
in
but unstable for nixos:
let
unstableTarball =
fetchTarball
https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz;
in
Is this what you mean
Is this setting wrong?
Assuming you’re using 21.11, you’d want to change your home-manager assignment to:
let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-21.11.tar.gz";
in
I also had this issue, and switch/rebuilds starting failing (likely due to an update). The sample in the wiki (Home Manager - NixOS Wiki ) demonstrates pointing to master, which I now know should be your release version.
3 Likes
klt
April 28, 2023, 7:18pm
7
Thanks @joshrosso for your help.
I changed to
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz";
and NixOS rebuilds
1 Like
For those using flakes, here is the syntax to use the proper version of Home Manager:
home-manager.url = "github:nix-community/home-manager/release-22.11";
7 Likes
Fixed it for me! Thanks Taco Milkshake!!!
I owe you a Taco and a milkshake, thanks.
2 Likes