nixos-rebuild: Don’t reset the experimental features

Make sure that the Nix `experimental-features` set by a user aren’t overwritten when running `nixos-rebuild --flake` by using `--extra-experimental-features` rather than `--experimental-features`.

Fix https://github.com/NixOS/nix/issues/4784
wip/little-gl
Théophane Hufschmitt 3 years ago committed by GitHub
parent c58b97674b
commit 601ceec28d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh

@ -105,7 +105,7 @@ while [ "$#" -gt 0 ]; do
;;
--flake)
flake="$1"
flakeFlags=(--experimental-features 'nix-command flakes')
flakeFlags=(--extra-experimental-features 'nix-command flakes')
shift 1
;;
--recreate-lock-file|--no-update-lock-file|--no-write-lock-file|--no-registries|--commit-lock-file)

Loading…
Cancel
Save