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 f04e803
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion nixos/doc/manual/release-notes/rl-1909.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ When upgrading from a previous release, please be aware of the following incompa

- By default, prometheus exporters are now run with `DynamicUser` enabled. Exporters that need a real user, now run under a separate user and group which follow the pattern `<exporter-name>-exporter`, instead of the previous default `nobody` and `nogroup`. Only some exporters are affected by the latter, namely the exporters `dovecot`, `node`, `postfix` and `varnish`.

- The `ibus-qt` package is not installed by default anymore when [i18n.inputMethod.enabled](options.html#opt-i18n.inputMethod.enabled) is set to `ibus`. If IBus support in Qt 4.x applications is required, add the `ibus-qt` package to your [environment.systemPackages](options.html#opt-environment.systemPackages) manually.
- The `ibus-qt` package is not installed by default anymore when `i18n.inputMethod.enabled` is set to `ibus`. If IBus support in Qt 4.x applications is required, add the `ibus-qt` package to your [environment.systemPackages](options.html#opt-environment.systemPackages) manually.

- The CUPS Printing service now uses socket-based activation by default, only starting when needed. The previous behavior can be restored by setting `services.cups.startWhenNeeded` to `false`.

Expand Down
2 changes: 1 addition & 1 deletion nixos/doc/manual/release-notes/rl-2205.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ In addition to numerous new and upgraded packages, this release has the followin
was added in order to automatically run XDG autostart files for sessions without a desktop manager.
This replaces helpers like the `dex` package.

- When setting [i18n.inputMethod.enabled](#opt-i18n.inputMethod.enabled) to `fcitx5`,
- When setting `i18n.inputMethod.enabled` to `fcitx5`,
it no longer creates corresponding systemd user services.
It now relies on XDG autostart files to start and work properly in your desktop sessions.
If you are using only a window manager without a desktop manager, you need to enable
Expand Down
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 f04e803

Please sign in to comment.