When building '<nixpkgs>', nix-build checks to see if there is a file
literally called '<nixpkgs>' in the current directory (why?! it doesn't
use it if there is one). If it can't access the current directory to
do this check, it fails with the error message:
error: filesystem error: symlink_status: Permission denied [/home/alice/<nixpkgs>]
So we cd to a place where it can read the current directory.
# Build
in_tmpdir hydrate ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build
while read user;do
# Build
in_tmpdir hydrate ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build
while read user;do
- hydrate /run/wrappers/bin/sudo -u "$user" \
+ hydrate /run/wrappers/bin/sudo -u "$user" -D / \
${pkgs.nix}/bin/nix-build --no-out-link '<nixpkgs>' -A "$(userenv_query "$user" .package)"
done < <( config_query '.userEnvironments | keys []' )
${pkgs.nix}/bin/nix-build --no-out-link '<nixpkgs>' -A "$(userenv_query "$user" .package)"
done < <( config_query '.userEnvironments | keys []' )