moved keyboard config to hardware.nix

This commit is contained in:
Leyla Becker 2025-05-30 13:00:47 -05:00
parent ee389bdb92
commit 5dd2b22821
2 changed files with 16 additions and 13 deletions

View file

@ -1,4 +1,9 @@
{lib, ...}: {
{
lib,
config,
pkgs,
...
}: {
options.host.hardware = {
piperMouse = {
enable = lib.mkEnableOption "host has a piper mouse";
@ -16,4 +21,14 @@
enable = lib.mkEnableOption "can a host be used on its own";
};
};
config = lib.mkMerge [
(lib.mkIf config.host.hardware.piperMouse.enable {
services.udev.packages = [pkgs.piper];
})
(lib.mkIf config.host.hardware.viaKeyboard.enable {
hardware.keyboard.qmk.enable = true;
services.udev.packages = [pkgs.via];
})
];
}

View file

@ -1,12 +0,0 @@
{
lib,
config,
pkgs,
...
}: {
config = lib.mkIf config.host.hardware.viaKeyboard {
hardware.keyboard.qmk.enable = true;
services.udev.packages = [pkgs.via];
};
}