feat: move additional hardware to dedicated module.

This commit is contained in:
CronyAkatsuki 2025-03-16 12:12:50 +01:00
parent 1717d75db7
commit 7a276908ef
4 changed files with 33 additions and 3 deletions

View File

@ -34,9 +34,6 @@
enable32Bit = true;
};
# Setup OpenTabletDriver graphic tablet driver
hardware.opentabletdriver.enable = true;
# Enable networking
networking.networkmanager.enable = true;
networking.nameservers = ["192.168.0.10" "1.1.1.1"];

View File

@ -0,0 +1,17 @@
{
config,
lib,
...
}: {
imports = [
./graphics-tablet.nix
];
options = {
crony.additional-hardware.enable = lib.mkEnableOption "Enable additional hardware modules.";
};
config = lib.mkIf config.crony.additional-hardware.enable {
crony.additional-hardware.otd.enable = lib.mkDefault true;
};
}

View File

@ -0,0 +1,14 @@
{
config,
lib,
...
}: {
options = {
crony.additional-hardware.otd.enable = lib.mkEnableOption "Enable OpenTabletDriver";
};
config = lib.mkIf config.crony.additional-hardware.otd.enable {
# Setup OpenTabletDriver graphic tablet driver
hardware.opentabletdriver.enable = true;
};
}

View File

@ -17,6 +17,7 @@
./hyprland.nix
./sddm.nix
./watchdog.nix
./additional-hardware
];
crony.bluetooth.enable = lib.mkDefault true;
@ -36,4 +37,5 @@
crony.hyprland-nixos.enable = lib.mkDefault true;
crony.sddm.enable = lib.mkDefault true;
crony.watchdog.disable = lib.mkDefault true;
crony.additional-hardware.enable = lib.mkDefault true;
}