Quick Reference Handbook


jj

Forget unwanted jj remote bookmarks

From: 202510 Snippets

$ jj bookmark list --remote upstream -T 'concat(self.name(), "\n")' \
    | grep -v -E '^(master|nixos-unstable|staging|staging-next)$' \
    | xargs jj bookmark forget --include-remotes
Forgot 29 local bookmarks.
Forgot 29 remote bookmarks.

linux

altgr-intl + compose key (NixOS)

From: 202503 Snippets and Links

{
    services.xserver.xkb.layout = "us";
    services.xserver.xkb.variant = "altgr-intl"; # «cool and new»
    services.xserver.xkb.options = "compose:rwin"; # grp:caps_toggle,grp_led:scroll
    # Required for some compose key mappings to work
    # <Multi_key> <Z> <Z>			: "ℤ"	U2124 # DOUBLE-STRUCK CAPITAL Z
    # just showed underlined CC without setting this
    environment.variables.GTK_IM_MODULE = "xim";
    environment.sessionVariables.GTK_IM_MODULE = "xim";
}

New box runbook

From: 202503 Snippets and Links

I try to configure most aspects of my systems declaratively in LunNova/nixos-configs. Some things are easier to do impurely.

  • [ ] If using impermanence/persistence
    • [ ] Verify persisted dirs are bind mounted
    • [ ] Write something into ~ and reboot to confirm it's still there
    • [ ] Write user password hash to persist vol
  • [ ] If using FDE
    • [ ] Ensure a recovery key that doesn't rely on TPM is safely recorded and tested
  • [ ] Browser
    • [ ] uBlock Origin
    • [ ] Password manager
  • [ ] Join tailnet
  • [ ] Configure syncthing
  • [ ] Ensure fstrim/discard is working so SSD won't die
  • [ ] Ensure some sort of alert if the system is severely outdated is present

ROCm global config toggle

From: Using ROCm with NixOS or Nixpkgs

Do:

  • Access specific packages you want ROCm for via pkgsRocm, such as pkgs.pkgsRocm.llama-cpp and pkgsRocm.blender
  • Enable config.rocmSupport for a nixpkgs used in a purpose specific environment that uses ROCm.

Don't:

  • Enable config.rocmSupport globally for an entire NixOS config or home-manager config

Why:

Many packages have some support for machine learning. Enabling it for all of them is at present increasing the chance you hit a build failure and possibly a reliability or security hazard.
ROCm's code quality isn't as good as browsers aim for. Firefox and thunderbird use ROCm via onnxruntime if enabled. They do sandbox in separate processes, but if you don't need it why risk it?
ROCm packages often are large, and there's no sense wasting gigabytes on them if you don't need them.

Sample:

{
	# I want ROCm support for just llama-cpp and blender
	environment.systemPackages = [
		pkgs.pkgsRocm.blender
		pkgs.pkgsRocm.llama-cpp
		# … other packages accessed normally
	];
}

nix

Check nix cache presence from flake ref

From: 202510 Snippets

$ echo github:nixos/nixpkgs/{release-25.05,master}#ollama-rocm | xargs -n1 sh -c 'nix eval --raw "$1"; echo' -- | xargs -n1 nix path-info --store https://cache.nixos.org
/nix/store/kds9g0m2fhknx051gblg1d5lz52clf23-ollama-0.11.10
/nix/store/hd4lwgnfag8x8b8kir69lw2qhq8vhx2n-ollama-0.12.5
$ echo github:nixos/nixpkgs/staging#ollama-rocm | xargs -n1 sh -c 'nix eval --raw "$1"; echo' -- | xargs -n1 nix path-info --store https://cache.nixos.org
don't know how to build these paths:
  /nix/store/w1xxhfd5y0v5jbm19gzqlb4xa63bb1ym-ollama-0.12.5
error: path '/nix/store/w1xxhfd5y0v5jbm19gzqlb4xa63bb1ym-ollama-0.12.5' does not exist in the store