I recently switched to Xonsh and I’m trying to setup direnv.
There is a plugin for direnv but I can’t install it with xpip
because it says pip is missing.
/nix/store/wl02plhc6zf84m6x9984l42wnnnbly5m-python3-3.9.6/bin/python3.9: No module named pip
Just adding pip packages doesn’t work.
{ pkgs, ... }:
let
username = import ../../username.nix;
in
{
programs.xonsh = {
enable = true;
config = ''
aliases['management-server'] = "mosh ${username}@10.7.89.106 tmux a"
aliases['nix-generations'] = "sudo nix-env --list-generations --profile /nix/var/nix/profiles/system"
aliases['rebuild'] = "sudo nixos-rebuild -j auto switch"
aliases['find-garbage'] = "ls -l /nix/var/nix/gcroots/auto/ | sort"
aliases['format-module'] = "nixpkgs-fmt **/*.nix"
'';
};
users.users.${username} = {
shell = pkgs.xonsh;
};
environment.systemPackages = with pkgs; [
python39Packages.pip
];
}