about summary refs log tree commit diff
path: root/modules/common/direnv.nix
blob: 6ec39d1d44bcb528775f0e237d1d3b0b5b8bcaec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  config,
  lib,
  ...
}:
with lib; let
  cfg = config.nixfiles.modules.direnv;
in {
  options.nixfiles.modules.direnv.enable =
    mkEnableOption "direnv";

  config = mkIf cfg.enable {
    hm.programs.direnv = {
      enable = true;
      config.global = {
        strict_env = true;
        warn_timeout = 0;
      };
      nix-direnv.enable = true;
    };
  };
}

Consider giving Nix/NixOS a try! <3