direnv.nix: init, move direnv to own file
This commit is contained in:
parent
15d2d920b8
commit
41530fa9eb
5 changed files with 31 additions and 7 deletions
|
@ -37,7 +37,6 @@ in {
|
|||
modules = [
|
||||
./vali/temperance
|
||||
../modules
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -47,7 +46,6 @@ in {
|
|||
modules = [
|
||||
./vali/hermit
|
||||
../modules
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,20 +15,27 @@ in {
|
|||
enableDirenv = mkEnableOption "direnv";
|
||||
};
|
||||
|
||||
# NOTE: to keep this configuration sane and simple,
|
||||
# we import the NixOS home manager module instead of the
|
||||
# standalone one.
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager = {
|
||||
# Verbosity is great, give me verbosity.
|
||||
verbose = true;
|
||||
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
|
||||
#
|
||||
backupFileExtension = "hm.old";
|
||||
extraSpecialArgs = {inherit inputs self impurity;};
|
||||
extraSpecialArgs = {inherit inputs self;};
|
||||
users.${username} = {
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
direnv = mkIf cfg.enableDirenv {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
|
|
|
@ -4,5 +4,6 @@ _: {
|
|||
./gui
|
||||
./tui
|
||||
./editors
|
||||
./other/module.nix
|
||||
];
|
||||
}
|
||||
|
|
15
modules/programs/other/direnv.nix
Normal file
15
modules/programs/other/direnv.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
_: {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
# PLEASE BE SILENT
|
||||
silent = true;
|
||||
|
||||
# We want direnv to load in our nix dev shells
|
||||
loadInNixShell = true;
|
||||
|
||||
# Integrations for all our shells
|
||||
enableZshIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
};
|
||||
}
|
3
modules/programs/other/module.nix
Normal file
3
modules/programs/other/module.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
_: {
|
||||
imports = [./direnv.nix];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue