mirror of
https://github.com/tboerger/nixos-config
synced 2024-11-29 20:52:33 +01:00
36 lines
592 B
Nix
36 lines
592 B
Nix
{ pkgs, lib, config, options, ... }:
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.profile.programs.direnv;
|
|
|
|
in
|
|
{
|
|
options = {
|
|
profile = {
|
|
programs = {
|
|
direnv = {
|
|
enable = mkEnableOption "Direnv" // {
|
|
default = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
home-manager.users."${config.profile.username}" = { config, ... }: {
|
|
programs = {
|
|
direnv = {
|
|
enable = true;
|
|
enableZshIntegration = true;
|
|
|
|
nix-direnv = {
|
|
enable = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|