feat: add nix-direnv
This commit is contained in:
parent
666a519d1b
commit
85785398b3
2 changed files with 30 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
./devtools/ai-tools.nix
|
./devtools/ai-tools.nix
|
||||||
./devtools/languages.nix
|
./devtools/languages.nix
|
||||||
./devtools/default.nix
|
./devtools/default.nix
|
||||||
|
./devtools/direnv.nix
|
||||||
./devtools/try.nix
|
./devtools/try.nix
|
||||||
./secrets.nix
|
./secrets.nix
|
||||||
];
|
];
|
||||||
|
|
@ -34,6 +35,8 @@
|
||||||
path = "~/src/tries";
|
path = "~/src/tries";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
rsydn.direnv.enable = lib.mkDefault true;
|
||||||
|
|
||||||
rsydn.devTools = {
|
rsydn.devTools = {
|
||||||
enable = lib.mkDefault true;
|
enable = lib.mkDefault true;
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
|
|
||||||
27
modules/home/devtools/direnv.nix
Normal file
27
modules/home/devtools/direnv.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkOption types mkIf;
|
||||||
|
cfg = config.rsydn.direnv;
|
||||||
|
in {
|
||||||
|
options.rsydn.direnv = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enable direnv with nix-direnv for automatic devshell activation.";
|
||||||
|
};
|
||||||
|
silent = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Suppress direnv loading messages.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableNushellIntegration = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
silent = cfg.silent;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue