nix-darwin
nix-darwin copied to clipboard
cannot darwin-rebuild with ca-derivations
I was keen to test out ca-derivations, per discourse, however, unlike nixos-rebuild, darwin-rebuild appears to not really pull in system configuration files (/etc/nix/nix.conf), since unlike on nixos, I had to apply the following patch to nix-darwin, to get it ca building:
diff --git a/pkgs/nix-tools/darwin-rebuild.sh b/pkgs/nix-tools/darwin-rebuild.sh
index 8952ee5..1919a84 100644
--- a/pkgs/nix-tools/darwin-rebuild.sh
+++ b/pkgs/nix-tools/darwin-rebuild.sh
@@ -112,7 +112,7 @@ done
if [ -z "$action" ]; then showSyntax; fi
-flakeFlags=(--extra-experimental-features 'nix-command flakes')
+flakeFlags=(--extra-experimental-features 'ca-derivations nix-command flakes')
if [ -n "$flake" ]; then
if [[ $flake =~ ^(.*)\#([^\#\"]*)$ ]]; then
my gut would suggest that we either need to directly source that file, or alter how hermetic our current calls to nix are, but nothing stood out to me as causal in my read of pkgs/nix-tools/darwin-rebuild.sh.
Could you add --option experimental-features ca-derivations to the flags you use when calling darwin-rebuild?