Files
zmk-config/flake.nix
T

50 lines
1.4 KiB
Nix
Raw Normal View History

2024-10-28 11:22:16 -05:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
zmk-nix = {
url = "github:lilyinstarlight/zmk-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, zmk-nix }: let
forAllSystems = nixpkgs.lib.genAttrs (nixpkgs.lib.attrNames zmk-nix.packages);
in {
packages = forAllSystems (system: rec {
default = firmware;
firmware = zmk-nix.legacyPackages.${system}.buildSplitKeyboard {
name = "firmware";
src = nixpkgs.lib.sourceFilesBySuffices self [ ".board" ".cmake" ".conf" ".defconfig" ".dts" ".dtsi" ".json" ".keymap" ".overlay" ".shield" ".yml" "_defconfig" ];
board = "nice_nano_v2";
shield = "lily58_%PART%";
2025-02-22 03:46:59 -06:00
zephyrDepsHash = "sha256-eD+2lu2w3mLaegEn7sxWmkCKk2m7Vor+4BlEao5LPR8=";
2024-10-28 11:22:16 -05:00
meta = {
description = "ZMK firmware";
license = nixpkgs.lib.licenses.mit;
platforms = nixpkgs.lib.platforms.all;
};
};
flash = zmk-nix.packages.${system}.flash.override { inherit firmware; };
update = zmk-nix.packages.${system}.update;
});
2024-10-29 08:02:31 -05:00
apps = forAllSystems (system: {
default = {
type = "app";
program = "${nixpkgs.lib.getExe self.packages.${system}.flash}";
};
});
2024-10-28 11:22:16 -05:00
devShells = forAllSystems (system: {
default = zmk-nix.devShells.${system}.default;
});
};
}