diff --git a/nix/darwin/darwin-configuration.nix b/nix/darwin/darwin-configuration.nix index 47a7d75..53b93e0 100644 --- a/nix/darwin/darwin-configuration.nix +++ b/nix/darwin/darwin-configuration.nix @@ -1,9 +1,10 @@ -{ pkgs, ... }: +{ pkgs, config, lib, ... }: { nix = { package = pkgs.nix; - settings.sandbox = true; + # SEE: https://github.com/NixOS/nix/issues/4119#issuecomment-1734738812 + settings.sandbox = "relaxed"; extraOptions = '' experimental-features = nix-command flakes ''; @@ -52,6 +53,11 @@ # programs.bash.enable = true; # default shell on catalina # programs.fish.enable = true; + system.systemBuilderArgs = lib.mkIf (config.nix.settings.sandbox == "relaxed") { + sandboxProfile = '' + (allow file-read* file-write* process-exec mach-lookup (subpath "${builtins.storeDir}")) + ''; + }; # Used for backwards compatibility, please read the changelog before changing. # $ darwin-rebuild changelog system.stateVersion = 4;