Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set always-allow-substitutes to true in nix.conf #977

Merged
merged 3 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ Differing from the upstream [Nix](https://github.com/NixOS/nix) installer script
+ the `nix-command` and `flakes` features are enabled
+ `bash-prompt-prefix` is set
+ `auto-optimise-store` is set to `true` (On Linux only)
* `always-allow-substitutes` is set to `true`
* `extra-nix-path` is set to `nixpkgs=flake:nixpkgs`
* `max-jobs` is set to `auto`
* `upgrade-nix-store-path-url` is set to `https://install.determinate.systems/nix-upgrade/stable/universal`, to prevent unintentional downgrades.
Expand Down
3 changes: 3 additions & 0 deletions src/action/common/place_nix_configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ impl PlaceNixConfiguration {
#[cfg(not(target_os = "macos"))]
settings.insert("auto-optimise-store".to_string(), "true".to_string());

// https://github.com/NixOS/nix/pull/8047
settings.insert("always-allow-substitutes".to_string(), "true".to_string());

settings.insert(
"bash-prompt-prefix".to_string(),
"(nix:$name)\\040".to_string(),
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/linux/linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@
"path": "/etc/nix/nix.conf",
"pending_nix_config": {
"settings": {
"always-allow-substitutes": "true",
"experimental-features": "nix-command flakes auto-allocate-uids",
"build-users-group": "nixbld",
"auto-optimise-store": "true",
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/linux/steam-deck.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@
"path": "/etc/nix/nix.conf",
"pending_nix_config": {
"settings": {
"always-allow-substitutes": "true",
"auto-optimise-store": "true",
"bash-prompt-prefix": "(nix:$name)\\040",
"build-users-group": "nixbld",
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/macos/macos.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@
"path": "/etc/nix/nix.conf",
"pending_nix_config": {
"settings": {
"always-allow-substitutes": "true",
"extra-nix-path": "nixpkgs=flake:nixpkgs",
"auto-allocate-uids": "true",
"auto-optimise-store": "true",
Expand Down
Loading