Update home.nix
- Add xonsh - Setup nix-direnv
This commit is contained in:
27
nix/home.nix
27
nix/home.nix
@@ -1,5 +1,23 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }: let
|
||||||
|
# Mach-nix is a toolkit for constructing custom Python environments
|
||||||
|
mach-nix = import (builtins.fetchGit {
|
||||||
|
url = "https://github.com/DavHau/mach-nix/";
|
||||||
|
ref = "refs/tags/3.3.0";
|
||||||
|
}) {
|
||||||
|
pkgs = pkgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
xonsh_pyenv = mach-nix.mkPython {
|
||||||
|
requirements = ''
|
||||||
|
xontrib-fzf-widgets
|
||||||
|
xonsh-direnv
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
xonsh_with_plugins = pkgs.xonsh.overrideAttrs (old: {
|
||||||
|
propagatedBuildInputs = old.propagatedBuildInputs ++ xonsh_pyenv.python.pkgs.selectPkgs xonsh_pyenv.python.pkgs;
|
||||||
|
});
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# Home Manager needs a bit of information about you and the
|
# Home Manager needs a bit of information about you and the
|
||||||
# paths it should manage.
|
# paths it should manage.
|
||||||
@@ -20,16 +38,15 @@
|
|||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
xonsh_with_plugins
|
||||||
zoxide
|
zoxide
|
||||||
fd
|
fd
|
||||||
fzf
|
fzf
|
||||||
ncdu
|
ncdu
|
||||||
ripgrep
|
ripgrep
|
||||||
# kitty
|
|
||||||
git
|
git
|
||||||
direnv
|
|
||||||
leiningen
|
|
||||||
];
|
];
|
||||||
|
|
||||||
services.lorri.enable = true;
|
programs.direnv.enable = true;
|
||||||
|
programs.direnv.nix-direnv.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ $ALTERNATE_EDITOR = "vim"
|
|||||||
$TERMINAL = "kitty"
|
$TERMINAL = "kitty"
|
||||||
|
|
||||||
config_dir = p"~/.dotfiles/xonsh"
|
config_dir = p"~/.dotfiles/xonsh"
|
||||||
xsh_modules = ["prompt", "nix", "path", "alias", "java", "linux", "python", "local", "docker", "kitty"]
|
xsh_modules = ["prompt", "path", "alias", "java", "linux", "python", "local", "docker", "kitty", "nix"]
|
||||||
|
|
||||||
for module in xsh_modules:
|
for module in xsh_modules:
|
||||||
_p = config_dir / f"{module}.xsh"
|
_p = config_dir / f"{module}.xsh"
|
||||||
|
|||||||
Reference in New Issue
Block a user