Skip to content

Commit

Permalink
Only use nix-daemon when systemd is supported
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Aug 25, 2021
1 parent 82ce26d commit 2fc50b7
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions lib/install-nix.sh
Expand Up @@ -21,12 +21,24 @@ fi

# Nix installer flags
installer_options=(
--daemon
--daemon-user-count 4
--no-channel-add
--darwin-use-unencrypted-nix-store-volume
--nix-extra-conf-file /tmp/nix.conf
)

# only use the nix-daemon if systemd is supported
if [[ -e /run/systemd/system ]]; then
installer_options+=(
--daemon
--daemon-user-count 4
)
else
# "fix" the following error when running nix*
# error: the group 'nixbld' specified in 'build-users-group' does not exist
mkdir -m 0755 /etc/nix
echo "build-users-group =" > /etc/nix/nix.conf
fi

if [[ $INPUT_INSTALL_OPTIONS != "" ]]; then
IFS=' ' read -r -a extra_installer_options <<< $INPUT_INSTALL_OPTIONS
installer_options=("${extra_installer_options[@]}" "${installer_options[@]}")
Expand Down

0 comments on commit 2fc50b7

Please sign in to comment.