Describe the bug
When users.users."foo".packages is set to a non-empty value, system-manager switch --flake fails with:
[2026-03-11T07:51:46Z INFO system_manager_engine::register] Building new system-manager generation...
[2026-03-11T07:51:46Z INFO system_manager_engine::register] Running nix build...
warning: Git tree '/home/ll/.config/system-manager' is dirty
error:
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:37:12:
36|
37| strict = derivationStrict drvAttrs;
| ^
38|
… while evaluating derivation 'system-manager'
whose name attribute is located at /nix/store/w2jcgb8c6yph72nsksa6zmc8qdna8ys4-source/pkgs/stdenv/generic/make-derivation.nix:536:13
… while evaluating attribute 'buildCommand' of derivation 'system-manager'
at /nix/store/w2jcgb8c6yph72nsksa6zmc8qdna8ys4-source/pkgs/build-support/trivial-builders/default.nix:80:17:
79| enableParallelBuilding = true;
80| inherit buildCommand name;
| ^
81| passAsFile = [ "buildCommand" ] ++ (derivationArgs.passAsFile or [ ]);
… while evaluating the option `environment.etc."profiles/per-user/ll".source':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attribute 'path' missing
at /nix/store/gz424yag8ik0gmgngprbkqp66d4gb4k8-source/nix/modules/upstream/nixpkgs/users-groups.nix:930:22:
929| inherit (config.environment) pathsToLink extraOutputsToInstall;
930| inherit (config.system.path) ignoreCollisions postBuild;
| ^
931| };
[2026-03-11T07:51:49Z ERROR system_manager] Nix build failed, see console output for details.
To Reproduce
Steps to reproduce the behavior:
-
add this to config:
users.users."foo".packages = [pkgs.vim];
-
run system-manager switch --flake
Expected behavior
System build succeeds and vim is available in the user environment.
System information
$ nix run nixpkgs#nix-info -- -m
- system: `"x86_64-linux"`
- host os: `Linux 6.17.0-1012-oem, Ubuntu, 24.04.4 LTS (Noble Numbat), nobuild`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.33.3`
- channels(root): `"nixpkgs"`
- nixpkgs: `/nix/store/cpwpjm4w4nadpajf3fv9lwxkb0dypfgp-nixpkgs/nixpkgs`
$ system-manager --version
system-manager 1.0.0
Additional context
environment.systemPackages works fine.
Describe the bug
When
users.users."foo".packagesis set to a non-empty value,system-manager switch --flakefails with:To Reproduce
Steps to reproduce the behavior:
add this to config:
run
system-manager switch --flakeExpected behavior
System build succeeds and
vimis available in the user environment.System information
Additional context
environment.systemPackagesworks fine.