option to install in single user mode
This commit is contained in:
parent
e17a164a72
commit
8e079717a1
@ -6,6 +6,8 @@ inputs:
|
||||
description: 'Installation URL that will contain a script to install Nix.'
|
||||
install_options:
|
||||
description: 'Additional installer flags passed to the installer script.'
|
||||
single_user:
|
||||
description: 'Install Nix in single-user mode'
|
||||
nix_path:
|
||||
description: 'Set NIX_PATH environment variable.'
|
||||
extra_nix_config:
|
||||
@ -23,3 +25,4 @@ runs:
|
||||
INPUT_INSTALL_OPTIONS: ${{ inputs.install_options }}
|
||||
INPUT_NIX_PATH: ${{ inputs.nix_path }}
|
||||
INPUT_EXTRA_NIX_CONFIG: ${{ inputs.extra_nix_config }}
|
||||
INPUT_SINGLE_USER: $${{ inputs.extra_nix_config }}
|
||||
|
@ -37,7 +37,7 @@ installer_options=(
|
||||
)
|
||||
|
||||
# only use the nix-daemon settings if on darwin (which get ignored) or systemd is supported
|
||||
if [[ $OSTYPE =~ darwin || -e /run/systemd/system ]]; then
|
||||
if [[ $OSTYPE =~ darwin || -e /run/systemd/system && $INPUT_SINGLE_USER == "true" ]]; then
|
||||
installer_options+=(
|
||||
--daemon
|
||||
--daemon-user-count "$(python3 -c 'import multiprocessing as mp; print(mp.cpu_count() * 2)')"
|
||||
|
Loading…
x
Reference in New Issue
Block a user