Skip to content

Multi-user installation fails on Solus Linux distribution #4286

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

Open
StefanSchroeder opened this issue Nov 27, 2020 · 3 comments
Open

Multi-user installation fails on Solus Linux distribution #4286

StefanSchroeder opened this issue Nov 27, 2020 · 3 comments
Labels

Comments

@StefanSchroeder
Copy link

StefanSchroeder commented Nov 27, 2020

When following the installation instructions in the manual to perform a multi-user installation of the nix package-manager, the installation does not work as expected.

While all the files are installed correctly, the snippets for bash are not loaded, because the file /etc/bashrc does not exist.

  1. Run '$ sh <(curl -L https://nixos.org/nix/install) --daemon'
  2. Press 'n', then 'y' to confirm 'sudo'
  3. The installation proceeds and reports success.

Expected behavior

When instructed to open a new shell and to run 'nix-shell' that should do something, but it doesn't, because there is no file /etc/bashrc.

Additional context

Adding /etc/bashrc (sudo touch /etc/bashrc) will add this section to the file:

# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
  . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix

Possible solution

Either add the snippet to a new file /etc/bashrc if it does not exist or at least do not report success if none of the mechanisms to inject the loading found a suitable location to be inserted.

@abathur
Copy link
Member

abathur commented Nov 27, 2020

I believe this is covered by my unreleased fix in c40bad4. (The focus there is ZSH, but the tentative fix is touching these files if the directory exists).

@stale
Copy link

stale bot commented Jun 2, 2021

I marked this as stale due to inactivity. → More info

@Frizzus
Copy link

Frizzus commented Apr 30, 2025

I've found a similar issue when installing nix on Solus linux.
I'm struggling to implement tests. Does someone knows how i could do this ?

The pull request

@stale stale bot removed the stale label Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants