From e78ca0d551974ef69a51c1d284574248ab3a91c3 Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Thu, 28 Sep 2023 15:15:29 -0700 Subject: [PATCH 1/3] Reintroduce 640, 638, 627 --- src/action/common/place_nix_configuration.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/action/common/place_nix_configuration.rs b/src/action/common/place_nix_configuration.rs index 5be4e4ad6..a7d097e91 100644 --- a/src/action/common/place_nix_configuration.rs +++ b/src/action/common/place_nix_configuration.rs @@ -91,7 +91,7 @@ impl PlaceNixConfiguration { let settings = nix_config.settings_mut(); settings.insert("build-users-group".to_string(), nix_build_group_name); - let experimental_features = ["nix-command", "flakes", "auto-allocate-uids"]; + let experimental_features = ["nix-command", "flakes", "repl-flake"]; match settings.entry("experimental-features".to_string()) { Entry::Occupied(mut slot) => { let slot_mut = slot.get_mut(); @@ -115,6 +115,10 @@ impl PlaceNixConfiguration { "bash-prompt-prefix".to_string(), "(nix:$name)\\040".to_string(), ); + settings.insert( + "max-jobs".to_string(), + "auto".to_string(), + ); if let Some(ssl_cert_file) = ssl_cert_file { let ssl_cert_file_canonical = ssl_cert_file .canonicalize() From 68ade75a9d6e73f3e1416666c5efffa771d70b08 Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Thu, 28 Sep 2023 15:20:11 -0700 Subject: [PATCH 2/3] fmt --- src/action/common/place_nix_configuration.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/action/common/place_nix_configuration.rs b/src/action/common/place_nix_configuration.rs index a7d097e91..93f98d839 100644 --- a/src/action/common/place_nix_configuration.rs +++ b/src/action/common/place_nix_configuration.rs @@ -115,10 +115,7 @@ impl PlaceNixConfiguration { "bash-prompt-prefix".to_string(), "(nix:$name)\\040".to_string(), ); - settings.insert( - "max-jobs".to_string(), - "auto".to_string(), - ); + settings.insert("max-jobs".to_string(), "auto".to_string()); if let Some(ssl_cert_file) = ssl_cert_file { let ssl_cert_file_canonical = ssl_cert_file .canonicalize() From b344b10bddcd56a9daf202c7bf99bd170cd03454 Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Thu, 28 Sep 2023 15:39:38 -0700 Subject: [PATCH 3/3] Missed something from auto-allocate-uids --- src/action/common/place_nix_configuration.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/action/common/place_nix_configuration.rs b/src/action/common/place_nix_configuration.rs index 93f98d839..d24fcade8 100644 --- a/src/action/common/place_nix_configuration.rs +++ b/src/action/common/place_nix_configuration.rs @@ -130,11 +130,6 @@ impl PlaceNixConfiguration { "nixpkgs=flake:nixpkgs".to_string(), ); - // Auto-allocate uids is broken on Mac. Tools like `whoami` don't work. - // e.g. https://github.com/NixOS/nix/issues/8444 - #[cfg(not(target_os = "macos"))] - settings.insert("auto-allocate-uids".to_string(), "true".to_string()); - let create_directory = CreateDirectory::plan(NIX_CONF_FOLDER, None, None, 0o0755, force) .await .map_err(Self::error)?;