mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-31 04:04:32 +00:00
Merge 4c3bc04326
into b14a70c40f
This commit is contained in:
commit
55c3a1a46d
1 changed files with 13 additions and 4 deletions
|
@ -16,10 +16,11 @@ in {
|
|||
type = lib.types.nullOr lib.types.singleLineStr;
|
||||
default = null;
|
||||
description = ''
|
||||
The path that will be used for the {env}`FLAKE` environment variable.
|
||||
The path that will be used for the {env}`NH_FLAKE`
|
||||
({env}`FLAKE` if < 4.0.0-beta.1) environment variable.
|
||||
|
||||
{env}`FLAKE` is used by nh as the default flake for performing actions,
|
||||
like {command}`nh os switch`.
|
||||
{env}`NH_FLAKE` and {env}`FLAKE` are used by nh as the default flake for
|
||||
performing actions, like {command}`nh os switch`.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -60,7 +61,15 @@ in {
|
|||
|
||||
home = lib.mkIf cfg.enable {
|
||||
packages = [ cfg.package ];
|
||||
sessionVariables = lib.mkIf (cfg.flake != null) { FLAKE = cfg.flake; };
|
||||
sessionVariables = lib.mkIf (cfg.flake != null) {
|
||||
# Includes 4.0.0 beta versions
|
||||
${
|
||||
if lib.versionAtLeast cfg.package.version "4.0.0" then
|
||||
"NH_FLAKE"
|
||||
else
|
||||
"FLAKE"
|
||||
} = cfg.flake;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user = lib.mkIf cfg.clean.enable {
|
||||
|
|
Loading…
Add table
Reference in a new issue