Hello, i am right now trying to set up Home-Manager. i followed this and did nearly everything same, but when i run nixos-rebuild
, i get some error messages i dont understand.
the complete error message is:
$ sudo nixos-rebuild switch --show-trace
error:
… while evaluating the attribute 'config'
at /nix/store/k1i8sghsbwcwgw43mglmf634rc9p9mm8-nixos-23.11/nixos/lib/modules.nix:320:9:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
321| _module = checked (config._module);
… while calling the 'seq' builtin
at /nix/store/k1i8sghsbwcwgw43mglmf634rc9p9mm8-nixos-23.11/nixos/lib/modules.nix:320:18:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
321| _module = checked (config._module);
… while calling the 'throw' builtin
at /nix/store/k1i8sghsbwcwgw43mglmf634rc9p9mm8-nixos-23.11/nixos/lib/modules.nix:296:18:
295| ''
296| else throw baseMsg
| ^
297| else null;
error: The option `programs.home-manager' does not exist. Definition values:
- In `/etc/nixos/configuration.nix':
{
enable = true;
}
building Nix...
error:
… while evaluating the attribute 'config'
at /nix/store/k1i8sghsbwcwgw43mglmf634rc9p9mm8-nixos-23.11/nixos/lib/modules.nix:320:9:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
321| _module = checked (config._module);
… while calling the 'seq' builtin
at /nix/store/k1i8sghsbwcwgw43mglmf634rc9p9mm8-nixos-23.11/nixos/lib/modules.nix:320:18:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
321| _module = checked (config._module);
… while calling the 'throw' builtin
at /nix/store/k1i8sghsbwcwgw43mglmf634rc9p9mm8-nixos-23.11/nixos/lib/modules.nix:296:18:
295| ''
296| else throw baseMsg
| ^
297| else null;
error: The option `programs.home-manager' does not exist. Definition values:
- In `/etc/nixos/configuration.nix':
{
enable = true;
}
building the system configuration...
error:
… while evaluating the attribute 'config.system.build.toplevel'
at /nix/store/k1i8sghsbwcwgw43mglmf634rc9p9mm8-nixos-23.11/nixos/lib/modules.nix:320:9:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
321| _module = checked (config._module);
… while calling the 'seq' builtin
at /nix/store/k1i8sghsbwcwgw43mglmf634rc9p9mm8-nixos-23.11/nixos/lib/modules.nix:320:18:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
321| _module = checked (config._module);
… while calling the 'throw' builtin
at /nix/store/k1i8sghsbwcwgw43mglmf634rc9p9mm8-nixos-23.11/nixos/lib/modules.nix:296:18:
295| ''
296| else throw baseMsg
| ^
297| else null;
error: The option `programs.home-manager' does not exist. Definition values:
- In `/etc/nixos/configuration.nix':
{
enable = true;
}
my configuration.nix
related to Home-Manager:
{config, pkgs, ...}: {
imports = [
./hardware-configuration.nix
<home-manager/nixos>
];
(...)
home-manager.users.username = {pkgs, ...}: {
home.packages = [];
programs.zsh.enable = true;
home.stateVersion = "23.11";
};
(...)
programs.home-manager.enable = true;
(...)
}
i would be very happy if someone had awnsers.