home: direnv: set 'DIRENV_DEFAULT_FLAKE' as needed
All checks were successful
ci/woodpecker/push/check Pipeline was successful

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

View file

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