Skip to content

Instantly share code, notes, and snippets.

View 573's full-sized avatar

Daniel Kahlenberg 573

View GitHub Profile
\_<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 October 2, 2024 12:30
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 / .emacs
Last active August 27, 2024 11:06
edit text on web pages with emacs
;; For Windows emacs this file belongs to $env:APPDATA
;; M-: buffer-file-name.
;; (GNU Emacs 29.4 (build 2, x86_64-w64-mingw32) of 2024-07-05)
;; If you don't have MELPA in your package archives:
(require 'package)
(add-to-list
'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t) ; Org-mode's repository
(package-initialize)
@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
@573
573 / readme.md
Last active June 21, 2024 07:32
nix emacs tip attrValues
hm.programs.emacs = {
  enable = true;
  package = cfg.package;
  extraPackages = epkgs:
    attrValues ({
        inherit (epkgs.melpaPackages) jinx pdf-tools telega;
        inherit (epkgs.treesit-grammars) with-all-grammars;
      }
 // optionalAttrs (cfg.terminal == "VTerm") {