2021-03-13 01:01:00 +01:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.my.home.direnv;
|
|
|
|
in
|
2021-02-19 22:19:20 +01:00
|
|
|
{
|
2021-03-13 01:01:00 +01:00
|
|
|
options.my.home.direnv = with lib.my; {
|
|
|
|
enable = mkDisableOption "direnv configuration";
|
|
|
|
};
|
|
|
|
|
|
|
|
config.programs.direnv = lib.mkIf cfg.enable {
|
2021-02-19 22:19:20 +01:00
|
|
|
enable = true;
|
2021-06-27 00:54:55 +02:00
|
|
|
nix-direnv = {
|
|
|
|
# A better `use_nix`
|
|
|
|
enable = true;
|
|
|
|
# And `use_flake`
|
|
|
|
enableFlakes = true;
|
|
|
|
};
|
2021-02-19 22:19:20 +01:00
|
|
|
};
|
|
|
|
}
|