home: direnv: set 'DIRENV_DEFAULT_FLAKE' as needed
Some checks failed
ci/woodpecker/push/check Pipeline failed

This commit is contained in:
Bruno BELANYI 2024-04-15 14:08:00 +00:00
parent b179185782
commit bcd3721bd1

View file

@ -7,8 +7,8 @@ in
enable = my.mkDisableOption "direnv configuration";
defaultFlake = mkOption {
type = types.str;
default = "nixpkgs";
type = with types; nullOr str;
default = null;
example = "pkgs";
description = ''
Which flake from the registry should be used for
@ -40,7 +40,7 @@ in
lib.my.genAttrs' files linkLibFile;
home.sessionVariables = {
DIRENV_DEFAULT_FLAKE = cfg.defaultFlake;
DIRENV_DEFAULT_FLAKE = lib.mkIf (cfg.defaultFlake != null) cfg.defaultFlake;
};
};
}