mirror of
https://github.com/cachix/install-nix-action.git
synced 2024-11-21 16:10:52 +00:00
Merge pull request #89 from SuperSandro2000/patch-1
Only use nix-daemon when systemd is supported
This commit is contained in:
commit
6e7c9a9516
1 changed files with 14 additions and 2 deletions
|
@ -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 settings if on darwin (which get ignored) or systemd is supported
|
||||
if [[ $OSTYPE =~ darwin || -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[@]}")
|
||||
|
|
Loading…
Reference in a new issue