Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add QMK keyboard firmware environment #5

Merged
merged 4 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
| **Applications:** |
| `nb` | ✅ | ✅ | ✅ | IPython notebook |
| `a-perfect-shell` | ✅ | ✅ | ✅ | An opinionated shell environment |
| `1password` | ✅ | ✅ | | 1Password + a simple shell helper |
| `1password` | ✅ | ✅ | ✅ | 1Password + a simple shell helper |
| `qmk` | ✅ | ✅ | ✅ | Open-source keyboard firmware for Atmel AVR and Arm USB families |
| `anthropic` | | | | |
| `direnv` | | | | |
| `flaim` | | | | |
Expand Down
4 changes: 4 additions & 0 deletions qmk/.flox/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
run/
cache/
lib/
log/
4 changes: 4 additions & 0 deletions qmk/.flox/env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "qmk",
"version": 1
}
1 change: 1 addition & 0 deletions qmk/.flox/env/manifest.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"lockfile-version":1,"manifest":{"build":{},"hook":{"on-activate":""},"install":{"qmk":{"pkg-path":"qmk"}},"options":{"allow":{"licenses":[]},"semver":{},"systems":["aarch64-darwin","aarch64-linux","x86_64-darwin","x86_64-linux"]},"profile":{"common":"echo \"\"\necho \" ╔═════════════════════════════════════╗\"\necho \" ║ ║\"\necho \" ║ Compile and flash your firmware: ║\"\necho \" ║ 👉 qmk setup ║\"\necho \" ║ 👉 qmk compile ║\"\necho \" ║ 👉 qmk flash ║\"\necho \" ║ ║\"\necho \" ║ Read: https://docs.qmk.fm/newbs ║\"\necho \" ║ ║\"\necho \" ╚═════════════════════════════════════╝\"\necho \"\"\n"},"services":{},"vars":{},"version":1},"packages":[{"attr_path":"qmk","broken":false,"derivation":"/nix/store/8yml7k9w3khmy4wq3sb92235c8vk16p5-qmk-1.1.5.drv","description":"Program to help users work with QMK Firmware","group":"toplevel","install_id":"qmk","license":"MIT","locked_url":"https://github.com/flox/nixpkgs?rev=4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0","name":"qmk-1.1.5","outputs":{"dist":"/nix/store/a2zdg3xq5mayzxyh3xj5fm2dj79y4sp2-qmk-1.1.5-dist","out":"/nix/store/wvrgkzifqidf442bpaiy6jxc6w6x4xiz-qmk-1.1.5"},"outputs_to_install":["out"],"pname":"qmk","priority":5,"rev":"4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0","rev_count":694395,"rev_date":"2024-10-18T13:02:40Z","scrape_date":"2024-10-20T03:56:48Z","stabilities":["unstable"],"system":"aarch64-darwin","unfree":false,"version":"1.1.5"},{"attr_path":"qmk","broken":false,"derivation":"/nix/store/z56iypljiz3pcxbnvrngbh7x1x4gj8sv-qmk-1.1.5.drv","description":"Program to help users work with QMK Firmware","group":"toplevel","install_id":"qmk","license":"MIT","locked_url":"https://github.com/flox/nixpkgs?rev=4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0","name":"qmk-1.1.5","outputs":{"dist":"/nix/store/ncy71cij4w6s5503i2lavgr44n8rwy73-qmk-1.1.5-dist","out":"/nix/store/40nz4rzkygh844akl3xrn7b8zbb8rbfx-qmk-1.1.5"},"outputs_to_install":["out"],"pname":"qmk","priority":5,"rev":"4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0","rev_count":694395,"rev_date":"2024-10-18T13:02:40Z","scrape_date":"2024-10-20T03:56:48Z","stabilities":["unstable"],"system":"aarch64-linux","unfree":false,"version":"1.1.5"},{"attr_path":"qmk","broken":false,"derivation":"/nix/store/vlsf6163g6mvdi6pvmw7yj0xai8slgz1-qmk-1.1.5.drv","description":"Program to help users work with QMK Firmware","group":"toplevel","install_id":"qmk","license":"MIT","locked_url":"https://github.com/flox/nixpkgs?rev=4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0","name":"qmk-1.1.5","outputs":{"dist":"/nix/store/4h1xm7fn6qaxz7ji0xhilf5j920anark-qmk-1.1.5-dist","out":"/nix/store/aav197h6sxlx05qrclviphaxxqs2mcxm-qmk-1.1.5"},"outputs_to_install":["out"],"pname":"qmk","priority":5,"rev":"4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0","rev_count":694395,"rev_date":"2024-10-18T13:02:40Z","scrape_date":"2024-10-20T03:56:48Z","stabilities":["unstable"],"system":"x86_64-darwin","unfree":false,"version":"1.1.5"},{"attr_path":"qmk","broken":false,"derivation":"/nix/store/6a7wjjcxnrg7gmkqay742l7c5hhdhrm9-qmk-1.1.5.drv","description":"Program to help users work with QMK Firmware","group":"toplevel","install_id":"qmk","license":"MIT","locked_url":"https://github.com/flox/nixpkgs?rev=4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0","name":"qmk-1.1.5","outputs":{"dist":"/nix/store/bdsjgr9qvnrv85azwx4apgxa6wk2qsib-qmk-1.1.5-dist","out":"/nix/store/9cvvhxx94p6fr53wgsnhs5qi3vsp73vk-qmk-1.1.5"},"outputs_to_install":["out"],"pname":"qmk","priority":5,"rev":"4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0","rev_count":694395,"rev_date":"2024-10-18T13:02:40Z","scrape_date":"2024-10-20T03:56:48Z","stabilities":["unstable"],"system":"x86_64-linux","unfree":false,"version":"1.1.5"}]}
37 changes: 37 additions & 0 deletions qmk/.flox/env/manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version = 1

[install]
# That's literally it, that's all you need
qmk.pkg-path = "qmk"

[vars]

[hook]
on-activate = '''
'''

[profile]
common = '''
echo ""
echo " ╔═════════════════════════════════════╗"
echo " ║ ║"
echo " ║ Compile and flash your firmware: ║"
echo " ║ 👉 qmk setup ║"
echo " ║ 👉 qmk compile ║"
echo " ║ 👉 qmk flash ║"
echo " ║ ║"
echo " ║ Read: https://docs.qmk.fm/newbs ║"
echo " ║ ║"
echo " ╚═════════════════════════════════════╝"
echo ""
'''

[services]

[options]
systems = [
"aarch64-darwin",
"aarch64-linux",
"x86_64-darwin",
"x86_64-linux",
]
1 change: 1 addition & 0 deletions qmk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/qmk_firmware/
23 changes: 23 additions & 0 deletions qmk/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

set -eo pipefail

check_command() {
if ! command -v $1 2>&1 >/dev/null
then
echo "Error: '$1' command could not be found."
exit 1
fi
}

check_command qmk


qmk clone
echo ">>> QMK firmware cloned"

qmk setup -H $PWD/qmk_firmware --yes
echo ">>> QMK firmware setup"

qmk compile -kb clueboard/66/rev3 -km default
echo ">>> QMK firmware compiled"
Loading