First pass as Nix build
This commit is contained in:
Generated
+48
@@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1729980323,
|
||||||
|
"narHash": "sha256-eWPRZAlhf446bKSmzw6x7RWEE4IuZgAp8NW3eXZwRAY=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "86e78d3d2084ff87688da662cf78c2af085d8e73",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"zmk-nix": "zmk-nix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zmk-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1729989359,
|
||||||
|
"narHash": "sha256-sKv7amJel5SZVo/qMO9CytJTT2ehtwU/SqI+x+09mWc=",
|
||||||
|
"owner": "lilyinstarlight",
|
||||||
|
"repo": "zmk-nix",
|
||||||
|
"rev": "1ceefd4eff92f9f6f56bb467beef35d38d9e9a12",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "lilyinstarlight",
|
||||||
|
"repo": "zmk-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
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%";
|
||||||
|
|
||||||
|
zephyrDepsHash = "sha256-n7xX/d8RLqDyPOX4AEo5hl/3tQtY6mZ6s8emYYtOYOg=";
|
||||||
|
|
||||||
|
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;
|
||||||
|
});
|
||||||
|
|
||||||
|
devShells = forAllSystems (system: {
|
||||||
|
default = zmk-nix.devShells.${system}.default;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user