Skip to content

Commit

Permalink
flake.nix: factor out copy-paste of pcb packages
Browse files Browse the repository at this point in the history
  • Loading branch information
rgoulter committed Jun 11, 2024
1 parent 4a01d4e commit ce1b76f
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -174,25 +174,15 @@
qmk =
lib.attrsets.mapAttrs' (name: p: lib.attrsets.nameValuePair "qmk-${name}" p)
(lib.attrsets.filterAttrs (_: p: lib.attrsets.isDerivation p) (pkgs.callPackage ./nix/pkgs/qmk {}));
pcb = pkgs.callPackage ./pcb {};
pcb =
lib.attrsets.mapAttrs' (name: p: lib.attrsets.nameValuePair "pcb-${name}" p)
(lib.attrsets.filterAttrs (_: p: lib.attrsets.isDerivation p) (pkgs.callPackage ./pcb {}));
in
{
bootloader-stm32f103-stm32duino = bootloaders.stm32duino.stm32f103;
bootloader-stm32f401-tinyuf2 = bootloaders.tinyuf2.stm32f401;
bootloader-stm32f411-tinyuf2 = bootloaders.tinyuf2.stm32f411;

pcb-keyboard-100x100-minif4-dual-rgb-reversible = pcb.keyboard-100x100-minif4-dual-rgb-reversible;
pcb-keyboard-ch552-36-lhs = pcb.keyboard-ch552-36-lhs;
pcb-keyboard-ch552-36-rhs = pcb.keyboard-ch552-36-rhs;
pcb-keyboard-ch552-44 = pcb.keyboard-ch552-44;
pcb-keyboard-ch552-48 = pcb.keyboard-ch552-48;
pcb-keyboard-ch552-48-lpr = pcb.keyboard-ch552-48-lpr;
pcb-keyboard-pico42 = pcb.keyboard-pico42;
pcb-keyboard-pykey40-hsrgb = pcb.keyboard-pykey40-hsrgb;
pcb-keyboard-pykey40-lite = pcb.keyboard-pykey40-lite;
pcb-keyboard-x2-lumberjack-arm-hsrgb = pcb.keyboard-x2-lumberjack-arm-hsrgb;
pcb-keyboard-x2-lumberjack-arm = pcb.keyboard-x2-lumberjack-arm;

uf2conv = pkgs.callPackage ./nix/pkgs/uf2conv {};
wchisp = pkgs.callPackage ./nix/pkgs/wchisp {};

Expand All @@ -201,6 +191,7 @@
tag = "kicad-7";
};
}
// pcb
// qmk;

treefmt = import ./treefmt.nix;
Expand Down

0 comments on commit ce1b76f

Please sign in to comment.