Skip to content

Repository files navigation

nullkomma ⚡️❄️

built with nix FlakeHub

Opinionated 🤓, batteries-included 🔋, extra-DRY 🤌 Nix ❄️ boilerplate.

nullkommanix [ɪn ˈnʊl ˌkɔma ˈnɪçt͡s] noun German colloquialism (translation: in next to time).

Scope

nullkomma is per-project Nix scaffolding: flakes, templates, devshells, formatters/checks, Makefile helpers, and the CI patterns those templates ship.

It is not:

Concern Lives in
Fleet placement, clan, networking, fleet secrets dataheld/aoshima
Host baseline (boot, disk, hardening, host services) dataheld/pads
User environment policy (home-manager, shell ergonomics) dataheld/lap
Agentic coding app / runtime dataheld/gittens

Separation tracker: dataheld/aoshima#227.

Charter

This repo contributes to the broader IT infrastructure laid out in aoshima. When making changes, adhere to aoshima's charter.

Installing

Note

This is not another flake or development framework. It is much less; just the set of composable nix flakes and modules that I use for my projects.

Tip

The steps below are system / user prerequisites. Project-specific software is handled by the flake once you are inside the repo. Providing direnv and nix-direnv is user-environment policy (dataheld/lap), not something each project should own forever. Templates may still bootstrap nix-direnv from .envrc until that lands (#35).

  1. Install Nix (the package manager). The Determinate Nix Installer is recommended.

  2. Install direnv.

  3. (optional, recommended) Install nix-direnv for better performance during development. Prefer installing it once in your user environment rather than relying on per-project .envrc bootstraps.

  4. Add the necessary boilerplate files.

    nix flake init --template "https://flakehub.com/f/dataheld/nullkomma/0.1.*#default"
  5. (one-time only) Inside the repo, run direnv allow

Tip

Windows is not supported by Nix, but you can use the Windows Subsystem for Linux (WSL).

From now on, whenever you change into the directory of your project, all the necessary dependencies etc. will be ready. The first time you enter the directory, this might take some time.

Building

All build-targets are self-documented:

make help

Updating

Nix

There are two separate aspects to updating the nix dependencies.

  1. There may be newer versions available given the pinning in flake.nix. This can be accomplished by running make update-flake locally and may change the flake.lock. However such updates may break a project. It is therefore recommended to only run this in CI, using the periodically scheduled nix_maintenance.yml job. It will automatically open pull requests if there are updates available. Users can then inspect whether the updated project still passes all tests.
  2. The versions pinned in flake.nix (and the resulting flake.lock) itself may be out of date. The DeterminateSystems/flake-checker will fail if this is the case. It runs on every push as well as periodically. You can also run this locally using make check-flake-checker.

Development Shell

To bring the shell you are working in up to date with the source (nix.flake, etc.) of your repository:

direnv reload

Or if you have nix-direnv installed,:

nix-direnv-reload

Issues

nix-/direnv can be a bit chatty on launch. Set hide_env_diff=true to quiet it down.

About

Opinionated 🤓, batteries-included 🔋, extra-DRY 🤌 Nix boilerplate.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages