feat: move additional hardware to dedicated module.
This commit is contained in:
parent
1717d75db7
commit
7a276908ef
@ -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"];
|
||||
|
17
modules/nixos/additional-hardware/default.nix
Normal file
17
modules/nixos/additional-hardware/default.nix
Normal 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;
|
||||
};
|
||||
}
|
14
modules/nixos/additional-hardware/graphics-tablet.nix
Normal file
14
modules/nixos/additional-hardware/graphics-tablet.nix
Normal 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;
|
||||
};
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user