Compare commits

...

2 commits

Author SHA1 Message Date
Bruno BELANYI bcd3721bd1 home: direnv: set 'DIRENV_DEFAULT_FLAKE' as needed
Some checks failed
ci/woodpecker/push/check Pipeline failed
2024-04-15 14:08:00 +00:00
Bruno BELANYI b179185782 home: direnv: update default flake
Now that I (usually?) override `nixpkgs` in the registry, there's not
much use in defaulting to `pkgs`.
2024-04-15 14:06:21 +00:00

View file

@ -7,9 +7,9 @@ in
enable = my.mkDisableOption "direnv configuration";
defaultFlake = mkOption {
type = types.str;
default = "pkgs";
example = "nixpkgs";
type = with types; nullOr str;
default = null;
example = "pkgs";
description = ''
Which flake from the registry should be used for
<command>use pkgs</command> by default.
@ -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;
};
};
}