nixos/openrazer: properly rename mouseBatteryNotifier option

Changed files
+5 -16
nixos
modules
hardware
+5 -16
nixos/modules/hardware/openrazer.nix
···
[Startup]
sync_effects_enabled = ${toPyBoolStr cfg.syncEffectsEnabled}
devices_off_on_screensaver = ${toPyBoolStr cfg.devicesOffOnScreensaver}
-
battery_notifier = ${toPyBoolStr (cfg.mouseBatteryNotifier || cfg.batteryNotifier.enable)}
+
battery_notifier = ${toPyBoolStr cfg.batteryNotifier.enable}
battery_notifier_freq = ${builtins.toString cfg.batteryNotifier.frequency}
battery_notifier_percent = ${builtins.toString cfg.batteryNotifier.percentage}
···
'';
};
-
mouseBatteryNotifier = mkOption {
-
type = types.bool;
-
default = true;
-
description = ''
-
Mouse battery notifier.
-
'';
-
};
-
batteryNotifier = mkOption {
description = ''
Settings for device battery notifications.
···
};
};
-
config = mkIf cfg.enable {
-
warnings = flatten [
-
(optional cfg.mouseBatteryNotifier ''
-
The option openrazer.mouseBatteryNotifier is deprecated.
-
Please use openrazer.batteryNotifier instead to enable and configure battery notifications.
-
'')
-
];
+
imports = [
+
(mkRenamedOptionModule [ "hardware" "openrazer" "mouseBatteryNotifier" ] [ "hardware" "openrazer" "batteryNotifier" "enable" ])
+
];
+
config = mkIf cfg.enable {
boot.extraModulePackages = [ kernelPackages.openrazer ];
boot.kernelModules = drivers;