diff --git a/flake.nix b/flake.nix index 35edfff8..68527a6f 100644 --- a/flake.nix +++ b/flake.nix @@ -175,6 +175,7 @@ hardware = { bluetooth.enable = true; + joystick.enable = true; }; };} ) @@ -185,8 +186,6 @@ ./modules/kde.nix ./modules/sops.nix ./modules/boot/chn-PC.nix - ./modules/hardware/bluetooth.nix - ./modules/hardware/joystick.nix [ ./modules/hardware/nvidia-prime.nix { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; } ] ./modules/hardware/printer.nix ./modules/hardware/sound.nix diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix index 37ecab69..0bb394dd 100644 --- a/modules/hardware/default.nix +++ b/modules/hardware/default.nix @@ -3,6 +3,8 @@ inputs: options.nixos.hardware = let inherit (inputs.lib) mkOption types; in { bluetooth.enable = mkOption { type = types.bool; default = false; }; + joystick.enable = mkOption { type = types.bool; default = false; }; }; - config.hardware.bluetooth.enable = inputs.config.nixos.hardware.bluetooth.enable; + config.hardware = { bluetooth.enable = inputs.config.nixos.hardware.bluetooth.enable; } + // (if inputs.config.nixos.hardware.joystick.enable then { xone.enable = true; xpadneo.enable = true; } else {}); } diff --git a/modules/hardware/joystick.nix b/modules/hardware/joystick.nix deleted file mode 100644 index 068633cf..00000000 --- a/modules/hardware/joystick.nix +++ /dev/null @@ -1 +0,0 @@ -{ config.hardware = { xone.enable = true; xpadneo.enable = true; }; }