You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
Daniel Kahlenberg
573
10+ yrs professional background in e2e test automation and development.
OSS means a huge QoL π in my dev and personal life thus I aim 2 give back the π
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)
distributed build with nixbuild.net for nix-darwin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implementing complex numbers and FFT with just datatypes (no floats)
Implementing complex numbers and FFT with just datatypes (no floats)
In this article, I'll explain why implementing numbers with just algebraic
datatypes is desirable. I'll then talk about common implementations of FFT (Fast
Fourier Transform) and why they hide inherent inefficiencies. I'll then show how
to implement integers and complex numbers with just algebraic datatypes, in a
way that is extremely simple and elegant. I'll conclude by deriving a pure
functional implementation of complex FFT with just datatypes, no floats.
(work in progress) State of affairs on how to pin versions of individual Nix packages (or how to refer to a specific package version with Nix)
Yes, there are several ways to do this, but none of them are as direct and simple as git v2.1.2; htop v1.2.3 and come with a lot of caveats.
aside
Specifying versions for programming language packages are possible too, but that topic seems to be even messier. The most promising standardization effort to date is [dream2nix][1].
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters