From 55d0e719eb7898b404722e1d35380f0e8aa33d7a Mon Sep 17 00:00:00 2001 From: Erik Simon Date: Fri, 24 Jul 2026 20:01:44 +0200 Subject: [PATCH] experimental nix --- scripts/deploy | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/deploy b/scripts/deploy index 47be9e0..5b29844 100755 --- a/scripts/deploy +++ b/scripts/deploy @@ -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 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 : pre-generated SSH host keys (install) # and per-config sops age keys (flash). #