moved keyboard config to hardware.nix
This commit is contained in:
parent
ee389bdb92
commit
5dd2b22821
2 changed files with 16 additions and 13 deletions
|
@ -1,4 +1,9 @@
|
||||||
{lib, ...}: {
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
options.host.hardware = {
|
options.host.hardware = {
|
||||||
piperMouse = {
|
piperMouse = {
|
||||||
enable = lib.mkEnableOption "host has a piper mouse";
|
enable = lib.mkEnableOption "host has a piper mouse";
|
||||||
|
@ -16,4 +21,14 @@
|
||||||
enable = lib.mkEnableOption "can a host be used on its own";
|
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];
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf config.host.hardware.viaKeyboard {
|
|
||||||
hardware.keyboard.qmk.enable = true;
|
|
||||||
|
|
||||||
services.udev.packages = [pkgs.via];
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue