Hi!
I have the following in my home-manager configuration, which is embedded into a large NixOS configuration used on multiple machines:
{ config, pkgs, lib, ... }:
{
programs.fish = {
enable = true;
shellAbbrs.foo = "bar";
};
home.packages = with pkgs.fishPlugins; [
fzf-fish
pisces
];
};
On the first of my machines (a desktop), this works fine. The foo
shell abbreviation, and both plugins are available in fish
.
But on a second machine (a server), the shell abbreviations work, but the plugins are not installed.
On both machines, I inspected the contents of /etc/profiles/per-user/myname
which is where the plugins should be installed. On the first machine, the plugin functions are installed and working in share/fish/vendor_functions.d
(It’s a symlink to a directory in a home-manager-path
derivation). But on the second machine, share/fish
is missing.
Next, I inspected the .drv
files for the profiles on each machine and found the home-manager-path
derivations that each one depends on. On both machines, these home-manager-path
derivations contain a share/fish/vendor_functions.d
directory with the plugins installed, so I don’t think this is a home-manager problem.
For reference, here these are the contents of /etc/profiles/per-user/myname/share
on the first machine:
total 176
dr-xr-xr-x 2 root root 4096 Dec 31 1969 accountsservice
dr-xr-xr-x 2 root root 4096 Dec 31 1969 appdata
dr-xr-xr-x 2 root root 4096 Dec 31 1969 applications
dr-xr-xr-x 2 root root 4096 Dec 31 1969 bash-completion
dr-xr-xr-x 2 root root 4096 Dec 31 1969 dbus-1
dr-xr-xr-x 2 root root 4096 Dec 31 1969 desktop-directories
dr-xr-xr-x 2 root root 4096 Dec 31 1969 doc
dr-xr-xr-x 2 root root 4096 Dec 31 1969 emacs
lrwxrwxrwx 1 root root 72 Dec 31 1969 fish -> /nix/store/9zj0wmkzdq7d5p3sy9mmmb9amfvx4yam-home-manager-path/share/fish
lrwxrwxrwx 1 root root 73 Dec 31 1969 fonts -> /nix/store/9zj0wmkzdq7d5p3sy9mmmb9amfvx4yam-home-manager-path/share/fonts
lrwxrwxrwx 1 root root 71 Dec 31 1969 fzf -> /nix/store/9zj0wmkzdq7d5p3sy9mmmb9amfvx4yam-home-manager-path/share/fzf
lrwxrwxrwx 1 root root 75 Dec 31 1969 gettext -> /nix/store/9zj0wmkzdq7d5p3sy9mmmb9amfvx4yam-home-manager-path/share/gettext
lrwxrwxrwx 1 root root 71 Dec 31 1969 git -> /nix/store/9zj0wmkzdq7d5p3sy9mmmb9amfvx4yam-home-manager-path/share/git
lrwxrwxrwx 1 root root 76 Dec 31 1969 git-core -> /nix/store/9zj0wmkzdq7d5p3sy9mmmb9amfvx4yam-home-manager-path/share/git-core
lrwxrwxrwx 1 root root 75 Dec 31 1969 git-gui -> /nix/store/9zj0wmkzdq7d5p3sy9mmmb9amfvx4yam-home-manager-path/share/git-gui
lrwxrwxrwx 1 root root 72 Dec 31 1969 gitk -> /nix/store/9zj0wmkzdq7d5p3sy9mmmb9amfvx4yam-home-manager-path/share/gitk
lrwxrwxrwx 1 root root 74 Dec 31 1969 gitweb -> /nix/store/9zj0wmkzdq7d5p3sy9mmmb9amfvx4yam-home-manager-path/share/gitweb
lrwxrwxrwx 1 root root 79 Dec 31 1969 gnome-shell -> /nix/store/9zj0wmkzdq7d5p3sy9mmmb9amfvx4yam-home-manager-path/share/gnome-shell
lrwxrwxrwx 1 root root 73 Dec 31 1969 gnupg -> /nix/store/9zj0wmkzdq7d5p3sy9mmmb9amfvx4yam-home-manager-path/share/gnupg
dr-xr-xr-x 2 root root 4096 Dec 31 1969 hunspell
dr-xr-xr-x 3 root root 4096 Dec 31 1969 icons
dr-xr-xr-x 2 root root 4096 Dec 31 1969 info
dr-xr-xr-x 2 root root 4096 Dec 31 1969 kservices5
dr-xr-xr-x 2 root root 4096 Dec 31 1969 kservicetypes5
dr-xr-xr-x 2 root root 4096 Dec 31 1969 kxmlgui5
lrwxrwxrwx 1 root root 74 Dec 31 1969 locale -> /nix/store/9zj0wmkzdq7d5p3sy9mmmb9amfvx4yam-home-manager-path/share/locale
dr-xr-xr-x 2 root root 4096 Dec 31 1969 man
dr-xr-xr-x 2 root root 4096 Dec 31 1969 metainfo
dr-xr-xr-x 14 root root 4096 Dec 31 1969 mime
dr-xr-xr-x 2 root root 4096 Dec 31 1969 nano
dr-xr-xr-x 3 root root 4096 Dec 31 1969 nautilus-python
dr-xr-xr-x 2 root root 4096 Dec 31 1969 org
dr-xr-xr-x 2 root root 4096 Dec 31 1969 pixmaps
lrwxrwxrwx 1 root root 77 Dec 31 1969 pkgconfig -> /nix/store/9zj0wmkzdq7d5p3sy9mmmb9amfvx4yam-home-manager-path/share/pkgconfig
dr-xr-xr-x 2 root root 4096 Dec 31 1969 polkit-1
dr-xr-xr-x 2 root root 4096 Dec 31 1969 sounds
dr-xr-xr-x 2 root root 4096 Dec 31 1969 systemd
dr-xr-xr-x 2 root root 4096 Dec 31 1969 terminfo
dr-xr-xr-x 2 root root 4096 Dec 31 1969 themes
dr-xr-xr-x 2 root root 4096 Dec 31 1969 thumbnailers
dr-xr-xr-x 2 root root 4096 Dec 31 1969 vim-plugins
dr-xr-xr-x 2 root root 4096 Dec 31 1969 vulkan
dr-xr-xr-x 2 root root 4096 Dec 31 1969 X11
lrwxrwxrwx 1 root root 71 Dec 31 1969 zsh -> /nix/store/9zj0wmkzdq7d5p3sy9mmmb9amfvx4yam-home-manager-path/share/zsh
And here’s the same, but on the second machine. Note that none of the symlinks to the home-manager-path
are present:
total 108
dr-xr-xr-x 2 root root 4096 Dec 31 1969 appdata
dr-xr-xr-x 2 root root 4096 Dec 31 1969 applications
dr-xr-xr-x 2 root root 4096 Dec 31 1969 bash-completion
dr-xr-xr-x 2 root root 4096 Dec 31 1969 dbus-1
dr-xr-xr-x 2 root root 4096 Dec 31 1969 desktop-directories
dr-xr-xr-x 2 root root 4096 Dec 31 1969 doc
dr-xr-xr-x 2 root root 4096 Dec 31 1969 emacs
dr-xr-xr-x 2 root root 4096 Dec 31 1969 hunspell
dr-xr-xr-x 2 root root 4096 Dec 31 1969 icons
dr-xr-xr-x 2 root root 4096 Dec 31 1969 info
dr-xr-xr-x 2 root root 4096 Dec 31 1969 kservices5
dr-xr-xr-x 2 root root 4096 Dec 31 1969 kservicetypes5
dr-xr-xr-x 2 root root 4096 Dec 31 1969 kxmlgui5
dr-xr-xr-x 2 root root 4096 Dec 31 1969 man
dr-xr-xr-x 2 root root 4096 Dec 31 1969 metainfo
dr-xr-xr-x 14 root root 4096 Dec 31 1969 mime
dr-xr-xr-x 2 root root 4096 Dec 31 1969 nano
dr-xr-xr-x 2 root root 4096 Dec 31 1969 org
dr-xr-xr-x 2 root root 4096 Dec 31 1969 pixmaps
dr-xr-xr-x 2 root root 4096 Dec 31 1969 polkit-1
dr-xr-xr-x 2 root root 4096 Dec 31 1969 sounds
dr-xr-xr-x 2 root root 4096 Dec 31 1969 systemd
dr-xr-xr-x 2 root root 4096 Dec 31 1969 terminfo
dr-xr-xr-x 2 root root 4096 Dec 31 1969 themes
dr-xr-xr-x 2 root root 4096 Dec 31 1969 thumbnailers
dr-xr-xr-x 2 root root 4096 Dec 31 1969 vim-plugins
dr-xr-xr-x 2 root root 4096 Dec 31 1969 vulkan
I can’t for the life of me understand why one of these works and other doesn’t. Any insight would be appreciated. I can provide more details if necessary.