- Notifications
You must be signed in to change notification settings - Fork2
jhvst/nix-config
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Abstract -- We argue that the main benefit of an ephemeral Linux distribution is that a cluster of nodes categorically commutes over its initial state, and, by extension, by the help of well-defined configuration, any state after that. In practice, given an initial Linux configuration in the form of a NixOS declaration (acategory ofkexec
is issued (call this functiontmpfs
, and provide a script to generate a Linux kernel (abzImage
) and initial ramdisk (initrd
) from a givennixosConfiguration
.
A prominent direction in the Linux distribution scene lately has been the concept ofimmutable desktop operating systems. Recent examples includeFedora Silverblue (2018) andVanilla OS (2022). But, on my anecdotal understanding of the timelines concerning Linux distros, both are spiritual successors toCoreOS (2013).
The first time the concepts of CoreOS extended to a desktop system came to my radar wasin a blog post by Jessie Frazelle (2017). Here, Jessie modified the base image of CoreOS using Gentooemerge
to include graphics drivers. To a vast extent, this project does the same but withNixOS.
But there's more to my approach to operating systems than immutability:ephemerality. In NixOS circles, ephemerality is arguably more widely known as the concept oferasing your darlings, as blogged by Graham Christensen (2020). NixOS has tooling around maintaining these kinds of temporary Linux root filesystems, most notably,impermanence. In effect, these approaches help to maintain a reproducible Linux distribution by ensuring that the NixOS configuration isverbatim (Finnish:sanansamukainen) of the running system. Otherwise, undocumented state changes may creep into the system over time, hence mangling the difference between what is part of the OS and what is part of the user configuration. Over time, this demeans the point of using NixOS in the first place.
Another approach to a clean root filesystem is to delete the whole OS. This is the approach that I switched to in 2021 after readingRunning Fedora CoreOS directly from RAM. Historically, these so-calledlive-boot environments have been around for a long time in the form of Preboot eXecution Environments (PXEs). For example, most university and library computers boot using PXE. Technically speaking, what happens is that the BIOS of the computer asks a DHCP server for an operating system to start. The DHCP server then points to a TFTP server from which the boot files are loaded on put into RAM. When the computer shuts down, the RAM is cleared, hence the OS state destroyed. Coincidentally, I like this approach because it avoids needing a separate boot manager -- the "boot manager" is a PXE text file on the TFTP server. Before moving to NixOS in 2022, I maintained configuration files for this kind of system on a GitHub projectstateless-fcos
.
The timeline now continues from this repository in the form of NixOS configurations. Spiritually, it is a successor of both CoreOS and Jessie's graphical CoreOS. And what made the switch for me was that I initially wanted the graphics drivers for myrivi-loader
project. The idea was that my CoreOS server would also act as a remote GPU computing host for my own programming language, which I call Rivi.
What made getting into NixOS particularly easy was that my CoreOS server was already reproducible fromignition
configurations. Further, everything ran in apodman
container. So, to make the initial switch to NixOS, I merely had to translate thesystemd
processes fromignition
to NixOS option format.
- https://www.reddit.com/r/NixOS/comments/g77n4m/run_sway_on_startup/
- https://gist.github.com/nh2/b7d285a7530603c2fe0b426fbb3da350
About
My personal NixOS config