Skip to content

Instantly share code, notes, and snippets.

View KiaraGrouwstra's full-sized avatar
💁‍♀️

kiara KiaraGrouwstra

💁‍♀️
View GitHub Profile
@KiaraGrouwstra
KiaraGrouwstra / README.md
Last active October 20, 2026 18:30
Seekable zstd frame sizes for Nix NARs: measurement for https://github.com/NixOS/hydra/pull/1998

Seekable zstd frame sizes for Nix NARs

These scripts measure the frame rules of seekable-compression in Hydra (NixOS/hydra#1998). They give the tables in the Hydra manual and in the PR.

The input is the NixOS 26.05 KDE system closure that Hydra built (https://hydra.nixos.org/build/350170062):

/nix/store/0ssj8rzr806q4qbx5g3q0s6zlxirdwqb-nixos-system-nixos-26.05.12297.cd4ea8d57de1
@KiaraGrouwstra
KiaraGrouwstra / README.md
Last active October 2, 2026 16:19
File secrets contract: sops-nix and agenix providers (NixOS/nixpkgs#569488)

File secrets contract: sops-nix and agenix providers

Examples for NixOS/nixpkgs#569488. The two modules show how sops-nix and agenix can provide the file secrets contract. They need no change in these projects.

  • sops-file-secrets.nix: sops.fileSecrets.<name> makes sops.secrets.<name>.
  • agenix-file-secrets.nix: age.fileSecrets.<name> makes age.secrets.<name>.
  • usage.nix: services.stash gets two secrets from sops-nix and one from agenix.

The consumer sets request (owner, group, mode) and the provider sets response.path. The user connects the two and does not repeat the owner, group or mode of the service. providerOptions go to sops.secrets.<name> or age.secrets.<name> as they are. If a value in providerOptions is different from the value in request, the evaluation fails.

@KiaraGrouwstra
KiaraGrouwstra / demo.nix
Last active April 28, 2026 15:36
contracts web form
# Demo: derive a JSON schema for a contract type's chosen-per-instance
# provider configuration.
#
# `contracts.<x>.providers.<name>` stores `{ module, contract? }` where
# `module` is the provider's option set; downstream tooling (GUIs, schema
# generators) introspects `.loc`/`.type` to render forms. Per-instance
# overrides go through the same `instances.<consumer>.<...>` option, with
# `apply` resolving any `{ module, contract? }` leaf path-aware.
#
# Driven by `flake.nix` (`nix run .`); both `nixpkgs` and `clanJsonschema`
@KiaraGrouwstra
KiaraGrouwstra / nixpkgs-unstable-betterbird-build-failure.log
Created August 31, 2024 12:51
nixpkgs unstable betterbird build failure
This file has been truncated, but you can view the full file.
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/chsdviqn4gg2rf50dqzfz1qhlqshjxbj-thunderbird-115.9.0.source.tar.xz
source root is thunderbird-115.9.0
setting SOURCE_DATE_EPOCH to timestamp 1710518603 of file thunderbird-115.9.0/sourcestamp.txt
unpackPhase completed in 4 minutes 12 seconds
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
applying patch /nix/store/9lx1746yy56pn3dpc35l1xr6l3lykbin-env_var_for_system_dir-ff111.patch
patching file toolkit/xre/nsXREDirProvider.cpp
@KiaraGrouwstra
KiaraGrouwstra / ddg-vi-anywhere.js
Last active May 21, 2024 06:15
DDG-like Vim keybindings for any website
// ==UserScript==
// @name DDG-like Vim keybindings for any website
// @namespace https://gist.github.com/KiaraGrouwstra/cbc198f6be09f703c42327b2cb6a6947
// @version 0.0.3
// @description navigate page by keyboard!
// @author KiaraGrouwstra
// @match https://*/*
// @grant none
// @license WTFPL
// ==/UserScript==

prioriteiten

Alle Lampen Branden Telkens Rood:

  1. Aanwijzingen
  2. gedwongen invoegen
  3. belangrijke voertuigen
    • vervolg militaire colonne
    • voorrangsvoertuigen (sirene + blauwe zwaailichten)
  4. Lichten
@KiaraGrouwstra
KiaraGrouwstra / doxc-to-md.csv
Created March 31, 2024 20:12
docx to markdown
intent replace regex with
debold headers # +\*\*(.*)\*\* # $1
de-underline links \[<u>(.*)</u>\] [$1]
de-underline links \[<u>([\n\s\S]*?)</u>\] [$1]
remove empty comments <!-- -→\n+
ditch quote blocks ^(\s*)> ? $1
upgrade bolded lines to h2 (\[?)\*\*(.*)\*\* ## $1$2
normalize quotes ‘ '
normalize quotes ’ '
normalize quotes “ “
@KiaraGrouwstra
KiaraGrouwstra / config
Created March 31, 2024 15:06
kanshi config
profile lid_closed {
output HDMI-A-1 enable
}
profile undocked {
output eDP-1 enable
}
profile home_office {
output HDMI-A-1 enable mode 1366x768@60Hz position 0,0
# If a config.py file exists, this file is ignored unless it's explicitly loaded
# via config.load_autoconfig(). For more information, see:
# https://github.com/qutebrowser/qutebrowser/blob/main/doc/help/configuring.asciidoc#loading-autoconfigyml
# DO NOT edit this file by hand, qutebrowser will overwrite it.
# Instead, create a config.py - see :help for details.
config_version: 2
settings:
bindings.commands:
global:
@KiaraGrouwstra
KiaraGrouwstra / bisect-nix.md
Last active February 7, 2026 12:32
debugging nix builds using git bisect

⚠️ obsolete, instead see https://wiki.nixos.org/wiki/Bisecting

Bisecting is a feature of version control systems such as Git and Mercurial to easily pinpoint regressions. Owing to their reproducibility, Nix and NixOS are well-suited to this. As a result, there are a few common use-cases for Nix.

(If you don't have git available, you can make it available in a shell using:)

nix --extra-experimental-features 'nix-command flakes' shell nixpkgs#git