Skip to content

Commit

Permalink
Use auto-uid-allocate
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed May 25, 2023
1 parent 4b933aa commit 3eb75b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions install-nix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ add_config() {
add_config "max-jobs = auto"
# Allow binary caches for user
add_config "trusted-users = root ${USER:-}"
add_config "auto-allocate-uids = true"
# Add github access token
if [[ -n "${INPUT_GITHUB_ACCESS_TOKEN:-}" ]]; then
add_config "access-tokens = github.com=$INPUT_GITHUB_ACCESS_TOKEN"
Expand All @@ -32,7 +33,7 @@ if [[ -n "${INPUT_EXTRA_NIX_CONFIG:-}" ]]; then
add_config "$INPUT_EXTRA_NIX_CONFIG"
fi
if [[ ! $INPUT_EXTRA_NIX_CONFIG =~ "experimental-features" ]]; then
add_config "experimental-features = nix-command flakes"
add_config "experimental-features = nix-command flakes auto-allocate-uids"
fi

# Nix installer flags
Expand All @@ -46,7 +47,7 @@ installer_options=(
if [[ (! $INPUT_INSTALL_OPTIONS =~ "--no-daemon") && ($OSTYPE =~ darwin || -e /run/systemd/system) ]]; then
installer_options+=(
--daemon
--daemon-user-count "$(python3 -c 'import multiprocessing as mp; print(mp.cpu_count() * 2)')"
--daemon-user-count 1
)
else
# "fix" the following error when running nix*
Expand Down

0 comments on commit 3eb75b5

Please sign in to comment.