about summary refs log tree commit diff
path: root/nixos/modules/hardware/openrazer.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/hardware/openrazer.nix')
-rw-r--r--nixos/modules/hardware/openrazer.nix21
1 files changed, 5 insertions, 16 deletions
diff --git a/nixos/modules/hardware/openrazer.nix b/nixos/modules/hardware/openrazer.nix
index 5ba6abfdb3d7e..6f61254a60c1f 100644
--- a/nixos/modules/hardware/openrazer.nix
+++ b/nixos/modules/hardware/openrazer.nix
@@ -19,7 +19,7 @@ let
       [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}
 
@@ -80,14 +80,6 @@ in
         '';
       };
 
-      mouseBatteryNotifier = mkOption {
-        type = types.bool;
-        default = true;
-        description = ''
-          Mouse battery notifier.
-        '';
-      };
-
       batteryNotifier = mkOption {
         description = ''
           Settings for device battery notifications.
@@ -143,14 +135,11 @@ in
     };
   };
 
-  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;