-
Notifications
You must be signed in to change notification settings - Fork 5
/
flake.nix
136 lines (134 loc) · 6.16 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
{
description = "Personal Keyboard Configuration via Nix";
inputs = {
flake-parts.url = github:hercules-ci/flake-parts;
nix-project.url = github:shajra/nix-project;
keymaps-ergodoxez = { url = github:shajra/empty; flake = false; };
keymaps-model01 = { url = github:shajra/empty; flake = false; };
keymaps-model100 = { url = github:shajra/empty; flake = false; };
keymaps-moonlander = { url = github:shajra/empty; flake = false; };
arduino-boardsmanager-empty = {
url = file+https://github.com/keyboardio/boardsmanager/raw/main/devel/empty.tbz;
flake = false;
};
arduino-cores-avr = {
url = file+http://downloads.arduino.cc/cores/staging/avr-1.8.6.tar.bz2;
flake = false;
};
arduino-tools-avr-gcc = {
url = file+http://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino7-x86_64-pc-linux-gnu.tar.bz2;
flake = false;
};
arduino-tools-avrdude = {
url = file+http://downloads.arduino.cc/tools/avrdude-6.3.0-arduino17-x86_64-pc-linux-gnu.tar.bz2;
flake = false;
};
arduino-tools-ctags = {
url = file+https://downloads.arduino.cc/tools/ctags-5.8-arduino11-pm-x86_64-pc-linux-gnu.tar.bz2;
flake = false;
};
arduino-tools-dfu-util = {
url = file+https://downloads.arduino.cc/tools/dfu-util-0.11.0-arduino3-linux64.tar.bz2;
flake = false;
};
arduino-tools-ota = {
url = file+http://downloads.arduino.cc/tools/arduinoOTA-1.3.0-linux_amd64.tar.bz2;
flake = false;
};
arduino-discovery-dfu = {
url = file+https://downloads.arduino.cc/discovery/dfu-discovery/dfu-discovery_v0.1.2_Linux_64bit.tar.gz;
flake = false;
};
arduino-discovery-mdns = {
url = file+https://downloads.arduino.cc/discovery/mdns-discovery/mdns-discovery_v1.0.9_Linux_64bit.tar.gz;
flake = false;
};
arduino-discovery-serial = {
url = file+https://downloads.arduino.cc/discovery/serial-discovery/serial-discovery_v1.4.1_Linux_64bit.tar.gz;
flake = false;
};
arduino-monitor-serial = {
url = file+https://downloads.arduino.cc/monitor/serial-monitor/serial-monitor_v0.14.1_Linux_64bit.tar.gz;
flake = false;
};
arduino-xpack-arm = {
url = file+https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v9.3.1-1.3/xpack-arm-none-eabi-gcc-9.3.1-1.3-linux-x64.tar.gz;
flake = false;
};
arduino-xpack-openocd = {
url = file+https://github.com/xpack-dev-tools/openocd-xpack/releases/download/v0.11.0-1/xpack-openocd-0.11.0-1-linux-x64.tar.gz;
flake = false;
};
keyboardio-arduinocore = {
url = git+https://github.com/keyboardio/ArduinoCore-GD32-Keyboardio?submodules=1;
flake = false;
};
keyboardio-kaleidoscope-bundle = {
url = git+https://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio?submodules=1;
flake = false;
};
keyboardio-kaleidoscope-factory = {
url = git+https://github.com/keyboardio/Kaleidoscope;
flake = false;
};
qmk-factory = {
url = git+https://github.com/qmk/qmk_firmware?submodules=1;
flake = false;
};
};
outputs = inputs@{ flake-parts, nix-project, ... }:
flake-parts.lib.mkFlake { inherit inputs; } ({withSystem, config, ... }: {
imports = [ nix-project.flakeModules.nixpkgs ];
systems = [ "x86_64-linux" ];
perSystem = { system, nixpkgs, ... }:
let build = import nixpkgs.stable.path {
inherit system;
overlays = [ config.flake.overlays.default ];
};
in {
packages.default = build.shajra-keyboards-ci;
packages.flash-ergodoxez =
build.shajra-keyboards-flash-scripts.ergodoxez;
packages.flash-model01 =
build.shajra-keyboards-flash-scripts.model01;
packages.flash-model100 =
build.shajra-keyboards-flash-scripts.model100;
packages.flash-moonlander =
build.shajra-keyboards-flash-scripts.moonlander;
packages.licenses-thirdparty =
build.shajra-keyboards-licenses;
checks.ci = build.shajra-keyboards-ci;
legacyPackages.nixpkgs = build;
apps = rec {
default = licenses-thirdparty;
licenses-thirdparty = {
type = "app";
program =
"${build.shajra-keyboards-licenses}/bin/shajra-keyboards-licenses";
};
flash-ergodoxez = {
type = "app";
program =
"${build.shajra-keyboards-flash-scripts.ergodoxez}/bin/flash-ergodoxez";
};
flash-model01 = {
type = "app";
program =
"${build.shajra-keyboards-flash-scripts.model01}/bin/flash-model01";
};
flash-model100 = {
type = "app";
program =
"${build.shajra-keyboards-flash-scripts.model100}/bin/flash-model100";
};
flash-moonlander = {
type = "app";
program =
"${build.shajra-keyboards-flash-scripts.moonlander}/bin/flash-moonlander";
};
};
};
flake.overlays.default =
import nix/overlay.nix inputs withSystem;
});
}