You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed the fish self-test failing when I installed Nix via this installer from Fish on my Mac. After some investigation, I figured out that this is because this installer sets up Nix paths on Fish by placing a file in /etc/fish/conf.d-- what fish calls the sysconfdir. But sysconfdir is actually determined by the prefix Nix is installed to.
Consequently, when the config file that the Determinate Nix Installer creates for fish is never read when fish is installed from pkgsrc (where sysconfdir is /opt/pkg/etc/fish) or Nix (where sysconfdir is /nix/store/<hash>-fish/etc/fish). In the Nix case, this is a Nixpkgs bug: the useOperatingSystemEtc argument to the Fish package should create a hook in the hardcoded sysconfdir that loads conf.d snippets from /etc/fish as well, but it doesn't.
The correct sysconfdir path for a given fish installation can be found in the built-in fish variable __fish_sysconf_dir, i.e.:
To reiterate what is implied here, this means that even if we detect the sysconfdir correctly, we can't assume that it is writable, because it isn't in the Nix case!
You can check what config files fish reads on startup without as much noise as strace with:
fish --debug config -c exit
There are some additional concerns about sourcing and ordering to think about, but they span across installers and module systems so I'll be starting a new topic on NixOS Discourse about it soon.
The text was updated successfully, but these errors were encountered:
I noticed the fish self-test failing when I installed Nix via this installer from Fish on my Mac. After some investigation, I figured out that this is because this installer sets up Nix paths on Fish by placing a file in
/etc/fish/conf.d
-- what fish calls thesysconfdir
. Butsysconfdir
is actually determined by the prefix Nix is installed to.Consequently, when the config file that the Determinate Nix Installer creates for fish is never read when fish is installed from pkgsrc (where
sysconfdir
is/opt/pkg/etc/fish
) or Nix (wheresysconfdir
is/nix/store/<hash>-fish/etc/fish
). In the Nix case, this is a Nixpkgs bug: the useOperatingSystemEtc argument to the Fish package should create a hook in the hardcoded sysconfdir that loadsconf.d
snippets from/etc/fish
as well, but it doesn't.The correct sysconfdir path for a given fish installation can be found in the built-in fish variable
__fish_sysconf_dir
, i.e.:To reiterate what is implied here, this means that even if we detect the sysconfdir correctly, we can't assume that it is writable, because it isn't in the Nix case!
You can check what config files fish reads on startup without as much noise as
strace
with:There are some additional concerns about sourcing and ordering to think about, but they span across installers and module systems so I'll be starting a new topic on NixOS Discourse about it soon.
The text was updated successfully, but these errors were encountered: