feat(machine, secrets): add qmk and vial, export gemini key

This commit is contained in:
Mohammad Rafiq 2025-07-14 23:11:19 +08:00
parent 399e049775
commit 96321d4026
No known key found for this signature in database
3 changed files with 51 additions and 31 deletions

View file

@ -5,7 +5,12 @@ let
in
{
flake.modules.nixos.default =
{ config, modulesPath, ... }:
{
config,
modulesPath,
pkgs,
...
}:
let
cfg = config.machine;
in
@ -14,6 +19,7 @@ in
options.machine = {
bluetooth.enable = mkEnableOption "";
usb.automount = mkEnableOption "";
usb.qmk.enable = mkEnableOption "";
};
config = mkMerge [
(mkIf cfg.usb.automount {
@ -28,6 +34,18 @@ in
}
];
})
(mkIf cfg.usb.qmk.enable {
hardware.keyboard.qmk.enable = true;
services.udev = {
packages = with pkgs; [
vial
qmk
qmk-udev-rules
qmk_hid
];
};
})
(mkIf cfg.bluetooth.enable {
persistDirs = [ "/var/lib/bluetooth" ];
hardware.bluetooth = {