No description
  • Nix 76.6%
  • Shell 23.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
m4rti 044dab33bf
All checks were successful
Check / check (push) Successful in 1m32s
Package zeit as a standalone flake
Split out of the nix system flake, where it lived under packages/ along with
its first-use wrapper. As its own repo it gets its own CI and its own version
bumps.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 20:12:50 -04:00
.forgejo/workflows Package zeit as a standalone flake 2026-09-01 20:12:50 -04:00
.gitignore Package zeit as a standalone flake 2026-09-01 20:12:50 -04:00
alejandra.toml Package zeit as a standalone flake 2026-09-01 20:12:50 -04:00
flake.lock Package zeit as a standalone flake 2026-09-01 20:12:50 -04:00
flake.nix Package zeit as a standalone flake 2026-09-01 20:12:50 -04:00
package.nix Package zeit as a standalone flake 2026-09-01 20:12:50 -04:00
README.md Package zeit as a standalone flake 2026-09-01 20:12:50 -04:00
zeit-wrapper.sh Package zeit as a standalone flake 2026-09-01 20:12:50 -04:00

zeit

A Nix flake packaging zeit, a command line tool for tracking time spent on tasks and projects. Upstream lives at https://tty.fail/mrus/zeit; this repo is packaging only.

On top of a plain buildGoModule it adds two things:

  • Shell completions for bash, zsh and fish, generated at build time.
  • zeit-wrapper.sh, which creates the badger database on first use. Every read-only zeit command opens the database read-only and badger refuses to open one that does not exist, so on a fresh machine every read fails with "no manifest found" until some write command has run. The wrapper imports an empty JSON document once, which brings the database into existence and stores nothing. The script itself carries the longer explanation.

zeit is under the SEGV License, which restricts fields of use and so is unfree by nixpkgs' reckoning. This flake sets allowUnfree for its own outputs; consumers using overlays.default build against their own nixpkgs and have to allow it there.

Usage

{
	inputs.zeit.url = "git+https://git.cumsek.com/flakes/zeit";
}

Then either take the package directly:

environment.systemPackages = [inputs.zeit.packages.${pkgs.system}.default];

or add the overlay and use pkgs.zeit:

nixpkgs.overlays = [inputs.zeit.overlays.default];

Updating

Bump version in package.nix to the new upstream tag and update commit and date to match that tag — make bakes all three into runtime.{Version,Commit,Date} via -ldflags -X, and they are hardcoded rather than read from git so the build stays reproducible. Blank hash and vendorHash and let the build report the correct ones. Releases are listed at https://tty.fail/mrus/zeit/releases.

Checks

nix flake check -L

Builds the package and runs alejandra, deadnix, statix and shellcheck. CI runs the same command and nothing else.

Licence

The packaging is trivial; zeit itself is under the SEGV License 1.1, as recorded in meta.license.