Skip to content

Commit

Permalink
nixos/inputMethod: remove deprecated option
Browse files Browse the repository at this point in the history
  • Loading branch information
eclairevoyant committed Feb 24, 2025
1 parent e57fd6a commit bac288f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2505.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@
+extraCreateArgs+=("--exclude" "/some/path")
```

- `i18n.inputMethod.enabled` has been removed after deprecation in the prior release; set `i18n.inputMethod.enable = true;` and use `i18n.inputMethod.type` instead.

- `borgmatic` has been updated from 1.8.14 to 1.9.5, please check the [upstream changelog](https://projects.torsion.org/borgmatic-collective/borgmatic/releases) for more details, especially for a few possibly breaking changes noted in the [1.9.0 changelog](https://projects.torsion.org/borgmatic-collective/borgmatic/releases/tag/1.9.0).

- `programs.xonsh.package` now gets overrided internally with `extraPackages` to support `programs.xonsh.extraPackages`. See `programs.xonsh.extraPackages` for more details.
Expand Down
26 changes: 10 additions & 16 deletions nixos/modules/i18n/input-method/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,11 @@ in
{
options.i18n = {
inputMethod = {
enable = lib.mkEnableOption "an additional input method type" // {
default = cfg.enabled != null;
defaultText = lib.literalMD "`true` if the deprecated option `enabled` is set, false otherwise";
};

enabled = lib.mkOption {
type = lib.types.nullOr allowedTypes;
default = null;
example = "fcitx5";
description = "Deprecated - use `type` and `enable = true` instead";
};
enable = lib.mkEnableOption "an additional input method type";

type = lib.mkOption {
type = lib.types.nullOr allowedTypes;
default = cfg.enabled;
defaultText = lib.literalMD "The value of the deprecated option `enabled`, defaulting to null";
default = null;
example = "fcitx5";
description = ''
Select the enabled input method. Input methods is a software to input symbols that are not available on standard input devices.
Expand Down Expand Up @@ -94,10 +83,15 @@ in
};
};

imports = [
(lib.mkRemovedOptionModule [
"i18n"
"inputMethod"
"enabled"
] "Set i18n.inputMethod.enable = true; and use i18n.inputMethod.type instead")
];

config = lib.mkIf cfg.enable {
warnings =
lib.optional (cfg.enabled != null)
"i18n.inputMethod.enabled will be removed in a future release. Please use .type, and .enable = true instead";
environment.systemPackages = [
cfg.package
gtk2_cache
Expand Down

0 comments on commit bac288f

Please sign in to comment.