Skip to content

Conversation

jfroche
Copy link
Contributor

@jfroche jfroche commented Sep 19, 2025

Some distribution will stop evaluating the shell config file if they are not running in an interactive shell. As we append the nix paths to the end of the file, they will not be evaluated. Eg running ssh host nix --version would fail as if nix is not installed on the system.

We better prepend the nix paths to the shell config files to be sure that once nix is installed, nix path will be available in any shell.

Note that this is already the case for the detsys installer script for a while: DeterminateSystems/nix-installer#148

Possibly related errors:

#8061
#6628
#2587

Some distribution will stop evaluating the shell config file if
they are not running in an interactive shell. As we append the nix
paths to the end of the file, they will not be evaluated.

We better prepend the nix paths to the shell config files to be sure
that once nix is installed, nix path will be available in any shell.

Note that this is already the case for the detsys installer script for
a while: DeterminateSystems/nix-installer#148

Possibly related errors:

NixOS#8061
NixOS#6628
NixOS#2587
@jfroche jfroche requested a review from edolstra as a code owner September 19, 2025 12:12
@Mic92 Mic92 merged commit dcaf001 into NixOS:master Sep 22, 2025
14 checks passed
@Mic92 Mic92 added backport 2.30-maintenance Automatically creates a PR against the branch backport 2.31-maintenance Automatically creates a PR against the branch labels Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.30-maintenance Automatically creates a PR against the branch backport 2.31-maintenance Automatically creates a PR against the branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants