refactor: moved nixos modules to dendrite pattern
This commit is contained in:
parent
df8dd110ad
commit
0ea11e0236
219 changed files with 4802 additions and 4820 deletions
36
modules/nixos/hardware.nix
Normal file
36
modules/nixos/hardware.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{...}: {
|
||||
flake.nixosModules.nixos-hardware = {
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options.host.hardware = {
|
||||
piperMouse = {
|
||||
enable = lib.mkEnableOption "host has a piper mouse";
|
||||
};
|
||||
viaKeyboard = {
|
||||
enable = lib.mkEnableOption "host has a via keyboard";
|
||||
};
|
||||
openRGB = {
|
||||
enable = lib.mkEnableOption "host has open rgb hardware";
|
||||
};
|
||||
graphicsAcceleration = {
|
||||
enable = lib.mkEnableOption "host has a gpu for graphical acceleration";
|
||||
};
|
||||
directAccess = {
|
||||
enable = lib.mkEnableOption "can a host be used on its own";
|
||||
};
|
||||
};
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.host.hardware.piperMouse.enable {
|
||||
services.ratbagd.enable = true;
|
||||
})
|
||||
(lib.mkIf config.host.hardware.viaKeyboard.enable {
|
||||
hardware.keyboard.qmk.enable = true;
|
||||
|
||||
services.udev.packages = [pkgs.via];
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue