refactor(modules): organize module tree

This commit was merged in pull request #72.
This commit is contained in:
2026-08-28 08:40:15 -04:00
parent f767b613a0
commit abac67afb4
41 changed files with 133 additions and 140 deletions

25
modules/shell/direnv.nix Normal file
View File

@@ -0,0 +1,25 @@
{
config,
lib,
...
}:
# direnv for the primary user, configured through home-manager.
let
cfg = config.modules.shell.direnv;
user = config.user.name;
in
{
options.modules.shell.direnv.enable =
lib.mkEnableOption "direnv for the primary user, with nix-direnv shell caching";
config = lib.mkIf cfg.enable {
home-manager.users.${user}.programs.direnv = {
enable = true;
silent = true;
# nix-direnv caches the evaluated shell so re-entering a directory is instant
# instead of re-running `nix develop`, and adds the `use flake` stdlib helper.
nix-direnv.enable = true;
};
};
}