home: direnv: set 'DIRENV_DEFAULT_FLAKE' as needed
All checks were successful
ci/woodpecker/push/check Pipeline was successful
All checks were successful
ci/woodpecker/push/check Pipeline was successful
This commit is contained in:
parent
6a22a80d42
commit
b735eb4b98
|
@ -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;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue