mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +03:00
nixos/nh: change FLAKE
variable to NH_FLAKE
; improve option docs (#401255)
This commit is contained in:
commit
f0f33d852d
1 changed files with 16 additions and 4 deletions
|
@ -8,7 +8,10 @@ let
|
|||
cfg = config.programs.nh;
|
||||
in
|
||||
{
|
||||
meta.maintainers = [ lib.maintainers.viperML ];
|
||||
meta.maintainers = with lib.maintainers; [
|
||||
NotAShelf
|
||||
viperML
|
||||
];
|
||||
|
||||
options.programs.nh = {
|
||||
enable = lib.mkEnableOption "nh, yet another Nix CLI helper";
|
||||
|
@ -19,9 +22,18 @@ in
|
|||
type = lib.types.nullOr lib.types.path;
|
||||
default = null;
|
||||
description = ''
|
||||
The path that will be used for the `FLAKE` environment variable.
|
||||
The path that will be used for the `NH_FLAKE` environment variable.
|
||||
|
||||
`FLAKE` is used by nh as the default flake for performing actions, like `nh os switch`.
|
||||
`NH_FLAKE` is used by nh as the default flake for performing actions, such as
|
||||
`nh os switch`. This behaviour can be overriden per-command with environment
|
||||
variables that will take priority.
|
||||
|
||||
- `NH_OS_FLAKE`: will take priority for `nh os` commands.
|
||||
- `NH_HOME_FLAKE`: will take priority for `nh home` commands.
|
||||
- `NH_DARWIN_FLAKE`: will take priority for `nh darwin` commands.
|
||||
|
||||
The formerly valid `FLAKE` is now deprecated by nh, and will cause hard errors
|
||||
in future releases if `NH_FLAKE` is not set.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -77,7 +89,7 @@ in
|
|||
environment = lib.mkIf cfg.enable {
|
||||
systemPackages = [ cfg.package ];
|
||||
variables = lib.mkIf (cfg.flake != null) {
|
||||
FLAKE = cfg.flake;
|
||||
NH_FLAKE = cfg.flake;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue