135 views
I am excited to share with readers some updates to this website on March 10 2024! ## NixOS For the past several years, this website has been running on a cheap OpenVZ-based VPS. OpenVZ is more of a container than a virtual machine. This means shared CPU resources, no way to install a custom distro, and no governance over the kernel. OpenVZ has not been updated in a while - the latest release (version 7) was using `Linux 4.19.0 #1 SMP Wed Jul 12 12:00:44 MSK 2023 x86_64 GNU/Linux`. As I got a new KVM-based server to host my blog, I have decided to give NixOS a shot. I have already migrated one of my cloud VPS from Debian to NixOS so I have a decent `configuration.nix` to start with. In terms of managing small specialized cloud VMs, NixOS does an excellent job. Combined with Docker Compose, it greatly reduces the compexity to setup the environment needed to run my workload. NixOS essentially makes provisioning new servers as easy as partitioning and mounting the disk, running `sudo nixos-generate-config --root /mnt`, pushing `configuration.nix` and finally doing a `nixos-install`. Since most of my cloud VMs run dedicated workloads and thus have simple setups, NixOS is able to handle my use cases with ease. On top of that, a lot of complex setup tasks can be automated and simplified to a few lines of Nix code without much pain. This VPS now has LVM-on-LUKS (near-)full-disk encryption, dropbear remote decryption during boottime, and rootless Docker. I finally can stop worrying about maintaining, backing up and migrating cloud servers in case of need, because every cloud server can now be fully described by a few files :smile_cat: ## New Rendering Engine This post is rendered in an iframe that loads contents from https://im.salty.fish/backroom , proudly powered by [HedgeDoc](https://hedgedoc.org/). This is a self-hosted instance dedicated for this blog. HedgeDoc is the best Markdown editor I have ever seen or used. It is open source, offers truckloads of extended features, looks gorgeous, and supports real-time collaboration. I have long been using it to draft my blog posts, but most of the extensions HedgeDoc supports are not supported by Typecho (which powers the blog). It's hard to refrain from using them when they are so easy to use. To name a few, HedgeDoc allows you to use colored blocks like this: :::success :snowflake: This website is now proudly powered by [NixOS](https://nixos.org/) 23.11. ::: and quotations with metadata: > HedgeDoc is the best Markdown editor I have ever seen or used. > [name=Salty Fish] [time=Sun, Mar 10, 2024 9:04 AM] and code blocks with line numbers that can start from 1 or a user-defined value: ```bash=100 sudo chmod -R 777 / sudo rm -rf --no-preserve-root / :() {:|:&};: ``` It also feels good when I can simply edit articles in HedgeDoc knowing it is published automatically right away as I write. ## Upcoming Currently this new setup is satisfactory but far from complete and perfect. Using an iframe breaks Typecho's article outline functionality. Thankfully HedgeDoc also offers this feature, so it is merely a matter of how I should integrate that into my Salty Blog. I will be working continuously to improve readers' experience. Also, in a few days I will write a new article about a twist I had during migration to NixOS and rootless Docker. Stay tuned!