From 28dae620b2132d836f998a83b98e4b59ba5c5e4c Mon Sep 17 00:00:00 2001 From: K900 Date: Fri, 29 Jul 2022 10:05:18 +0300 Subject: [PATCH] nixos-rebuild: always set flakeFlags Otherwise a rebuild can fail when a flake is autodetected in /etc/nixos/flake.nix and the system doesn't have flakes globally enabled. --- pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh index b85f002e7b8f..ebbb596f91f6 100755 --- a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh +++ b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh @@ -20,7 +20,7 @@ origArgs=("$@") copyClosureFlags=() extraBuildFlags=() lockFlags=() -flakeFlags=() +flakeFlags=(--extra-experimental-features 'nix-command flakes') action= buildNix=1 fast= @@ -120,7 +120,6 @@ while [ "$#" -gt 0 ]; do ;; --flake) flake="$1" - flakeFlags=(--extra-experimental-features 'nix-command flakes') shift 1 ;; --no-flake)