Add ChangeLog
Daniel Firth authored
84695815

qmk-deploy

[flake-parts] module to build qmk firmware.

You can enable this and set the options like so:

{
  inputs = {
    flake-parts.url = "github:hercules-ci/flake-parts";
    qmk-deploy.url = "git+https://gitlab.homotopic.tech/nix/qmk-deploy";
    nixpkgs.url = "github:NixOS/nixpkgs";
  };

  outputs = inputs.flake-parts.lib.mkFlake { inherit inputs; } {

    imports = [
      inputs.qmk-deploy.flakeModule
    ];

    perSystem = { ... }: {
      qmk.firmware = {
        enable = true;
        keyboardName = "zsa/voyager";
        keymapName = "default";
        src = "${inputs.self}/src";
        deploy = {
          enable = true;
          dfu-args = "-a 0 -d 3297:0791 -s 0x8002000:leave";
        };
      };
    };

}

If perSystem.qmk.firmware.src is set, then it will first copy this source into the qmk_firmware source tree under keyboards/${keyboardName}/keymaps/${keymapName};

If perSystem.qmk.firmware.keyboardAswell is set, then it will assume you want to replace the /whole/ keyboard source rather than just the keymap.

Building

To build the firmware do

nix build

Deploying

It doesn't wait for you to put your device into reset mode, so you will want to do

sleep 2 && sudo nix run