experimental nix
This commit is contained in:
@@ -81,6 +81,17 @@ REPO="$(git -C "$SCRIPT_DIR" rev-parse --show-toplevel 2>/dev/null || dirname "$
|
||||
cd "$REPO"
|
||||
export PATH="/nix/var/nix/profiles/default/bin:$PATH"
|
||||
|
||||
# Every `nix` call below assumes `nix-command` + `flakes`. Those are ambient on
|
||||
# a Determinate-Nix laptop, but a STOCK NixOS box leaves both experimental
|
||||
# features OFF — so bare `nix eval`/`build`/`run` die with "experimental Nix
|
||||
# feature 'nix-command' is disabled". That box is exactly the prepare host for
|
||||
# `install <config> localhost` (a fresh NixOS the reinstall runs from), and it
|
||||
# is why the installer-iso already sets these itself (flake.nix). Enable them
|
||||
# additively via NIX_CONFIG (extra-, so anything already configured is kept).
|
||||
# This runs again at the top of the sudo re-exec in require_root(), so root
|
||||
# gets it too regardless of whether `sudo -E` carries the env across.
|
||||
export NIX_CONFIG="$(printf 'extra-experimental-features = nix-command flakes\n%s' "${NIX_CONFIG:-}")"
|
||||
|
||||
# Off-repo material keyed by <config>: pre-generated SSH host keys (install)
|
||||
# and per-config sops age keys (flash).
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user