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

Only use nix-daemon when systemd is supported #89

Merged
merged 2 commits into from
Aug 28, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 14 additions & 2 deletions lib/install-nix.sh
Original file line number Diff line number Diff line change
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
SuperSandro2000 marked this conversation as resolved.
Show resolved Hide resolved
if [[ -e /run/systemd/system ]]; then
SuperSandro2000 marked this conversation as resolved.
Show resolved Hide resolved
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