I’m trying to use home-manager to install matplotlib:
home.nix
{ config, pkgs, ... }:
{
home.username = "lain";
home.homeDirectory = "/home/lain";
home.stateVersion = "23.11";
programs.home-manager.enable = true;
programs.bash.enable = true;
home.packages = with pkgs; [
# Special
python312Full
python312Packages.matplotlib # FIXME this isn't seen by the Python runtime
python312Packages.pillow # test package -- ALSO not seen by the Python runtime
fahclient
(llama-cpp.overrideAttrs (old : {
patches = (old.patches or []) ++ [
/home/lain/Documents/projects/llama-sandbox/fix-llamacpp-6723.patch
];
}))
##(builtins.getFlake "gitlab:doronbehar/nix-matlab") # FIXME how to make this identify as "locked"??
nodejs_20
# Misc
firefox
##librewolf # tfw librewolf is broken
# FIXME:
# https://github.com/NixOS/nixpkgs/issues/336490
# https://www.reddit.com/r/NixOS/comments/1ezu788/using_3rdparty_repos_with_homemanager/
libreoffice-qt # NOTE: using -qt while on the Plasma desktop
elinks
# System Administration & Casual Devtools
sensible-utils
file
xdiskusage
p7zip
tmux
htop
nano
gitFull git-lfs
];
home.sessionVariables = {
HISTIGNORE = " *";
};
## home.sessionPath = {
## "${XDG_DATA_HOME-${HOME}/.local}/bin" # FIXME this throws an error because bash syntax isn't allowed
## };
systemd.user.services.fahclient = {
Unit = {
Type = "simple";
Description = "Folding@home client";
After = [ "network.target" ];
};
Install = {
WantedBy = [ "default.target" ];
};
Service = {
ExecStart = "systemd-inhibit --why=\"folding\" fah-client";
WorkingDirectory = "%h/.local/share/fahclient";
};
};
#home.file = { };
}
…but Python simply doesn’t see the module, with the classic ModuleNotFoundError: No module named 'matplotlib'.
Logging out and back in did not fix this, nor did home-manager switch report any issues with the package.
What’s weird is if I use nix-shell -p to “install” the package in an ephemeral shell instead, it works.
I didn’t see anything on the Wiki about workarounds that might be required in this case.