refactor(nixos): inline module enable conditions
This commit was merged in pull request #134.
This commit is contained in:
@@ -5,14 +5,13 @@
|
||||
}:
|
||||
# direnv for the primary user, configured through home-manager.
|
||||
let
|
||||
cfg = config.modules.shell.direnv; # NOLINT(let_order)
|
||||
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 {
|
||||
config = lib.mkIf config.modules.shell.direnv.enable {
|
||||
home-manager.users.${user}.programs.direnv = {
|
||||
enable = true;
|
||||
silent = true;
|
||||
|
||||
Reference in New Issue
Block a user