Thanks to visit codestin.com
Credit goes to github.com

Skip to content

talarys/zmk-config

 
 

Repository files navigation

Nix Powered Totem ZMK Config

Build Status

This repository contains a ZMK (Zephyr Mechanical Keyboard) configuration tailored for the Totem keyboard. It leverages the power of Nix for reproducible builds and automation, making it easy to manage firmware development and deployment.

Table of Contents

Features

  • Automated Builds: Firmware is automatically built on every commit using Nix.
  • Release Automation: Automatically generates releases from the latest build.
  • Keymap Previews: Automatically generates a visual preview of the keymap on commit.
  • Local Builds: Easily build firmware locally using Nix.
  • Keymap Editor Compatibility: Fully compatible with the KeymapEditor.
  • Homerow Mods: Includes timeless homerow mods from urob.
  • Dongle Support: Default build includes support for the Seeeduino Xiao BLE dongle.

Setup

Pre-requisites

  1. Install the nix package manager:

    # Install Nix with flake support enabled
    curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix |
       sh -s -- install --no-confirm
    
    # Start the nix daemon without restarting the shell
    . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
  2. Install direnv (and optionally but recommended nix-direnv[^4]) using your package manager of choice. E.g., using the nix package manager that we just installed[^5]:

    nix profile install nixpkgs#direnv nixpkgs#nix-direnv
    
  3. Set up the direnv shell-hook for your shell. E.g., for bash:

    # Install the shell-hook
    echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
    
    # Enable nix-direnv (if installed in the previous step)
    mkdir -p ~/.config/direnv
    echo 'source $HOME/.nix-profile/share/nix-direnv/direnvrc' >> ~/.config/direnv/direnvrc
    
    # Optional: make direnv less verbose
    echo '[global]\nwarn_timeout = "2m"\nhide_env_diff = true' >> ~/.config/direnv/direnv.toml
    
    # Source the bashrc to activate the hook (or start a new shell)
    source ~/.bashrc

Set up the workspace

  1. Clone your fork of this repository. I like to name my local clone zmk-workspace as it will be the toplevel of the development environment.

    # Replace `urob` with your username
    git clone https://github.com/talarys/zmk-config zmk-workspace
  2. Enter the workspace and set up the environment.

    # The first time you enter the workspace, you will be prompted to allow direnv
    cd zmk-workspace
    
    # Allow direnv for the workspace, which will set up the environment (this takes a while)
    direnv allow
    
    # Initialize the Zephyr workspace and pull in the ZMK dependencies
    # (same as `west init -l config && west update && west zephyr-export`)
    just init
    
    # Finally just run:
    just build all

Current keymap

alt text

About

Personal ZMK firmware configuration.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 59.6%
  • Just 21.7%
  • Nix 17.9%
  • Shell 0.8%