Skip to content

Instantly share code, notes, and snippets.

View tazjin's full-sized avatar


View GitHub Profile
tazjin /
Last active November 18, 2020 22:57
Unfuck Twitter

This will reduce Twitter fuckery by ~64%. Twitter is very user-hostile (by design), so don't expect to be able to get rid of all issues.

  1. Go to Settings -> Content preferences -> Muted -> Muted words and mute all of these words:


tazjin / buildGo.nix
Created November 23, 2019 15:23
Bazel-style build rules for Go, but in Nix
# Copyright 2019 Google LLC.
# SPDX-License-Identifier: Apache-2.0
# buildGo provides Nix functions to build Go packages in the style of Bazel's
# rules_go.
{ pkgs ? import <nixpkgs> {}
, ... }:
tazjin /
Last active September 28, 2019 17:32
Documentation languages

Documentation format popularity

The SQL query below queries the [GitHub dataset on Google BigQuery][bq] for information about the popularity of different documentation formats.

Identification is based on file extensions in this version, and duplicates (e.g. READMEs across forks) are deduplicated by content hashes (which the table uses for the identifiers).

tazjin /
Last active September 7, 2022 15:36
Knotty - a featureless IRC bot


(knotty = Nix + bot + y, duh!)

Knotty is an IRC bot with functionality that is defined by its users. It uses the [Nix][] package manager's [language][nix-1p] for all logic.

This program reads an export reference graph (i.e. a graph representing the runtime dependencies of a set of derivations) created by Nix and groups them in a way that is likely to match the grouping for other derivation sets with overlapping dependencies.

This is used to determine which derivations to include in which layers of a container image.


tazjin /
Last active June 15, 2023 22:32
Yet Another Nix Type System (aka YANTS)


Note: Yants now has its own repository.

This is a tiny type-checker for data in Nix, written in Nix.


tazjin /
Last active February 25, 2023 19:11
Nix Language Overview

This Gist Has Moved!

Please find its new home at

The updated version contains more information and has issue tracking, hooray!

Nix - A One Pager

(defun set-xkb-layout (layout)
"Set the current X keyboard layout."
(shell-command (format "setxkbmap %s" layout))
(message "Set X11 keyboard layout to '%s'" layout))
(lambda (pair)
(kbd (format "s-%s" (cadr pair)))
tazjin /
Last active February 28, 2024 12:05
Nix builder for Kubernetes
tazjin / cargo-update.txt
Created October 5, 2018 21:33
house cleaning in journaldriver
~/s/journaldriver $ cargo update
Updating registry ``
Removing adler32 v1.0.2
Updating aho-corasick v0.6.4 -> v0.6.8
Removing arrayvec v0.4.7
Adding ascii v0.9.1
Updating atty v0.2.10 -> v0.2.11
Updating backtrace v0.3.8 -> v0.3.9
Updating backtrace-sys v0.1.21 -> v0.1.24
Updating base64 v0.9.1 -> v0.9.3