Added direnv

This commit is contained in:
marc
2022-11-21 11:22:33 +01:00
parent c335d7b082
commit 740f440400
6 changed files with 47 additions and 4 deletions

22
modules/dev/direnv.nix Normal file
View File

@@ -0,0 +1,22 @@
{ config, lib, pkgs, ... }:
let
cfg = config.samfelag.modules.dev.direnv;
in
{
options.samfelag.modules.dev.direnv = {
enable = lib.mkEnableOption "direnv";
};
config = lib.mkIf cfg.enable {
hm.programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
# Optional: To protect your nix-shell against garbage collection
nix.extraOptions = ''
keep-outputs = true
keep-derivations = true
'';
};
}

View File

@@ -92,7 +92,7 @@ in {
fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ];
env.PATH = [ "$XDG_CONFIG_HOME/emacs/bin" ];
env.PATH = [ "$HOME/.config/emacs/bin" ];
home-manager.users.marc.xdg.configFile."doom".source = ../../config/doom;

16
modules/system/utils.nix Normal file
View File

@@ -0,0 +1,16 @@
{ config, lib, pkgs, self, ... }:
let
cfg = config.samfelag.modules.system.utils;
in
{
options.samfelag.modules.system.utils = {
enable = lib.mkEnableOption "utils";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
zip
unzip
];
};
}