Skip to content

Commit 928ab2e

Browse files
committed
shared: add programs.nix-index.acknowledgeBreakingChange option
Link: nix-community#132
1 parent 80992d6 commit 928ab2e

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

nix/shared.nix

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1-
{ lib, ... }: {
1+
{ config, lib, ... }: {
22
options = {
3-
programs.nix-index-database.comma.enable = lib.mkEnableOption "wrapping comma with nix-index-database and put it in the PATH";
3+
programs = {
4+
nix-index-database.comma.enable = lib.mkEnableOption "wrapping comma with nix-index-database and put it in the PATH";
5+
6+
# TODO: Remove this option after the release of nixos-25.11.
7+
nix-index.acknowledgeBreakingChange = lib.mkOption {
8+
default = false;
9+
example = true;
10+
description = ''Whether to acknowledge the breaking change introduced in PR https://github.com/nix-community/nix-index-database/pull/132 ("treewide: disable programs.nix-index.enable option by default").'';
11+
type = lib.types.bool;
12+
};
13+
};
414
};
15+
16+
config.programs.nix-index.enable = lib.mkDefault (
17+
lib.warnIfNot
18+
config.programs.nix-index.acknowledgeBreakingChange
19+
"nix-index-database: programs.nix-index.enable no longer defaults to true. To disable this warning, set 'programs.nix-index.acknowledgeBreakingChange = true;' or override programs.nix-index.enable."
20+
false
21+
);
522
}

0 commit comments

Comments
 (0)