devshell: Accept flake config in build-n-switch

Pass `--accept-flake-config` explicitly because `doas` drops the
devshell configuration that enables it. This avoids prompts for the
flake’s binary cache settings when rebuilding as root.
This commit is contained in:
2026-10-31 15:19:14 +00:00
parent 967faad269
commit 20ac77d8a0
3 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -106,7 +106,8 @@ in
# HACK: Upstream changes in Git + Nix makes this necessary
# https://github.com/NixOS/nix/issues/10202
doas git config --global --add safe.directory "$PWD"
doas nixos-rebuild --flake . "$@"
# doas drops the devshell's NIX_USER_CONF_FILES, including accept-flake-config.
doas nixos-rebuild --accept-flake-config --flake . "$@"
'';
}
{