Skip to content

Instantly share code, notes, and snippets.

View 573's full-sized avatar

Daniel Kahlenberg 573

View GitHub Profile
@573
573 / readme.md
Last active July 13, 2024 09:29
nixos-wsl fatal error
sudo -i nix-store --gc

but then i. e. nix shell --no-substitute --option binary-caches '' .#nixosConfigurations.DANIELKNB1.pkgs.hello again gives:

error:
… while setting up the build environment

  error: getting attributes of path '/nix/store/w0cpwqkiim2b3cd8k0j5j1cz0s8kz87q-qemu-aarch64-binfmt-P-x86_64-unknown-linux-musl':  

No such file or directory

\_<http\_>://[^]]+
@573
573 / readme.md
Last active July 12, 2024 09:12
nix tip store path not found nix-store repair repair-path verify

Thanks ! To be fair, NixOS/nix#3230 already provided a (better) solution to links corruption, but was not advertised enough in this thread.

Fixing --repair-path avoids frustration in some cases but, as the warning message in my commit suggests, running a full store repair remains a good idea in that case.

For future reference, if you ever reach here: run nix-store --verify --check-contents --repair unless you have a good reason to repair only one of all the corrupt paths.

Le 11 janvier 2022 15:31:27 GMT+01:00, Ellie Hermaszewska @.***> a écrit : >oh my goodness 👏 👏 👏 👏

@573
573 / readme.md
Last active July 10, 2024 20:06
emacs windows aspell
  • (Get-Command sh).Path C:\Users\dkahlenberg\scoop\shims\sh.exe
  • cat C:\Users\dkahlenberg\scoop\shims\sh.shim path = "C:\Users\dkahlenberg\scoop\apps\git\current\bin\sh.exe"
 sh

 ~/scoop/apps/aspell/0.60.8.1-2/lib/aspell-0.60/de_DE
$ which make
/c/Users/dkahlenberg/scoop/shims/make

 ~/scoop/apps/aspell/0.60.8.1-2/lib/aspell-0.60/de_DE
@573
573 / readme.md
Created July 5, 2024 15:46
search set of archive files for filename according to pattern and (optionally) text in found files according to text pattern
@573
573 / hetzner_nixos_luks.md
Created June 22, 2024 20:07 — forked from alicebob/hetzner_nixos_luks.md
nixos 24.05 with full disk encryption on Hetzner cloud

Setup full disk encryption on a Hetzner cloud CX42 machine. No fancy SSH unlock: you have to go to their web based terminal to enter the disk password on boot.

Notes:

  • Their web based terminal is /weird/. You can paste things, but it looks like it's set up for a german keyboard, and many characters change ("http://" into "http;//"), sometimes it converts everything to lowercase after a while, sometimes it enters some capslocks mode. I ended up typing as much as possible by hand, and only use alphanumeric passphrases so there are no surprises when copy-pasting those.
  • The (qemu) virtual machine doesn't use EFI, but Legacy Boot. Most setup instructions I found are for EFI systems.

there we go

  • In the Hetzner UI click the server in the list, go to tab [ISO Images], search for "nix", and mount "NixOS 24.05 (x86_64/minimal)"
  • Reboot, and open the terminal. (the's a button on the top with [>_], which is a shortcut for the terminal)
@573
573 / readme.md
Last active June 21, 2024 07:31
nix tip: build special emacs packages
@573
573 / readme.md
Last active June 20, 2024 22:19
build a nix derivation of the form file.drv build recipe