Skip to content

Instantly share code, notes, and snippets.

View 573's full-sized avatar

Daniel Kahlenberg 573

View GitHub Profile
@573
573 / getting-started-with-nix.md
Created April 25, 2024 07:15 — forked from thiloho/getting-started-with-nix.md
Getting started with the Nix ecosystem

A snowflake through a magnifying glass

Getting started with the Nix ecosystem

What is this article about?

When I first started to learn how to use NixOS, the Nix package manager, and how to work with the Nix language, I was overwhelmed. While it did not take me too long to (sort of) get into it, it was not the most pleasant experience. I would say that there is not really a single source of truth, like Arch Linux users have with the ArchWiki, where you can basically look up everything. Instead, the information is spread across many different sources, which can make it difficult for beginners to find out how to do what they want to do.

The "modern nix CLI", also known as "nix3 cli", is another thing that can cause confusion when you are just starting your nix journey. There are some commands that look almost exactly the same, such as nix shell compared to nix-shell or nix-build compa

@573
573 / readme.md
Created April 22, 2024 15:58
nix tip: becoming maintainer template

i. e. (PR, howto test PR, upstream maintainer hint and code occurrences):

tl;dr replace meson test --print-errorlogs server regression/nix-ast-dump by meson test --print-errorlogs unit/libnixf/Basic unit/libnixf/Parse unit/libnixt in the PR state back then.

@573
573 / readme.md
Created April 20, 2024 19:05
nix tip: nixgl in nix run
$ nix run github:guibou/nixGL#nixGLIntel -- nix shell .#deltatouch
@573
573 / readme.md
Created April 16, 2024 17:51
shell tip: tr collections

i. e. tr ':' '\n' <<< $PATH

@573
573 / readme.md
Created April 16, 2024 08:30
nixos tip: using profiles to dis-/enable features
@573
573 / readme.md
Created April 15, 2024 15:49
pdf tip: decrypt password protected pdf
  export PW=... # w/o quotes

qpdf -password=$PW -decrypt /path/to/secured.pdf out.pdf

@573
573 / readme.md
Last active April 5, 2024 05:37
nix tip: nix eval nixos-config an attribute debug
@573
573 / readme.md
Last active March 26, 2024 09:26
syncthing discover devices when one device runs windows 10

read elsewhere that local discovery was only supported on rooted android devices, so to have my phone device discovered by syncthing on my machine running windows 10 I had at least temporary check "global discovery" on each of the participating devices.

My default configuration though sets them to false (https://docs.syncthing.net/users/faq.html#should-i-keep-my-device-ids-secret), temporary meaning manually on demand when I actually want to sync.

At the same time I keep "NAT traversal" (https://forum.syncthing.net/t/enable-nat-traversal-what-does-it-do/13044/4) disabled as it is not needed for my purposes.

grafik

grafik

@573
573 / readme.md
Created March 25, 2024 13:46
WIP backblaze with private encryption key alias sse-c alias custom server side encryption key
  • tl;dr backblaze does NOT support setting that with their webapp on linux (via desktop app only for windows / mac)
  • all solutions (shell script or even restic etc. etc.) all encrypt the data locally before basically just uploading it with the encryption key backblaze provide themselves, which is ok then because the encryption happenend already locally as said. if that is still the best option idk.