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:
@@ -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 . "$@"
|
||||
'';
|
||||
}
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user