System/home-manager/modules/programs/devel.nix

40 lines
709 B
Nix
Raw Normal View History

2024-11-29 05:46:01 +00:00
{
config,
lib,
pkgs,
...
}:
{
home.packages = with pkgs; [
# Git addons
git-secret
delta
# nix utilities
comma
nix-du
sops
hut
];
programs = {
direnv.enable = true;
2024-11-29 22:26:53 +00:00
# Configure direnv with nushell
2024-11-29 22:31:27 +00:00
nushell.extraConfig = ''
2024-11-29 22:26:53 +00:00
$env.config = {
hooks: {
pre_prompt: [{ ||
if (which direnv | is-empty) {
return
}
direnv export json | from json | default {} | load-env
if 'ENV_CONVERSIONS' in $env and 'PATH' in $env.ENV_CONVERSIONS {
$env.PATH = do $env.ENV_CONVERSIONS.PATH.from_string $env.PATH
}
}]
}
}
'';
2024-11-29 05:46:01 +00:00
};
}