Immutable Distros: What you should know - An introduction into image based systems (Part 1)
hallettj @ hallettj @beehaw.org Posts 15Comments 218Joined 2 yr. ago

It's like Ned Flanders says, "Oh, January 1st! Better get going on those taxes Neddy."
Although they're not in the search, they are in the manual so you can find them searching that page. This one is listed as,
security.pam.services..fprintAuth
But it does take some inferences to find this, and to realize that you can put doas
in place of ``
I did some digging around in the manual, and I tested this option which seems to work:
nix
security.pam.services.doas.fprintAuth = true;
On my machine that adds this line to /etc/pam.d/doas
:
auth sufficient /nix/store/fq4vbhdk8dqywxirg3wb99zidfss7sbi-fprintd-1.94.2/lib/security/pam_fprintd.so # fprintd (order 11400)
Edit: Note that the NixOS option puts in the full path to pam_fprintd.so
. That's necessary because NixOS doesn't put so
files in search paths.
Without doing more research I don't know how to add arbitrary options to pam files in case you run into something that isn't mapped to a NixOS option yet. The implementation for the pam options is here; there might be something in there that would work.
There is a bug report with some discussion here: https://github.com/ValveSoftware/steam-for-linux/issues/8076
Here is a source with lots of detail on how carbon emissions compare: https://www.theguardian.com/business/2023/dec/23/do-electric-cars-really-produce-fewer-carbon-emissions-than-petrol-or-diesel-vehicles
The tl;dr is that EVs have lower lifetime emissions. If the relevant grids use low-carbon sources then emissions are far lower. (But not as low as bicycles.)
Oh, I didn't know about the Teflon coating. From what I just read virtually all razor blades - both double-edged and cartridge - have PTFE coating. (Where PTFE is a PFAS compound, and PFAS is the family of compounds also known as Teflon.) But there is some hope for an alternative someday. https://www.pcimag.com/articles/111660-a-close-shave
So I guess I would say stick with double-edged. Or maybe electric would be better specifically with respect to water pollution? Since that's the big issue with PFAS. I don't know, just a guess.
I did not realize nano implemented syntax highlighting!
Oh right, there are some particular things that are helpful for a deeper language understanding.
Type classes and algebraic types are for sure standout features of Rust that make it better than most languages. Much of my experience before Rust was Typescript, but I have some background in Haskell so I was fortunate to have a head start on these concepts. I haven't done any Rust interviews - my current role switched from Haskell to Rust after I joined. So I don't know what interviewers are asking.
None of the prior languages you listed use manual memory management (which was the same for me). And even if you have that background, Rust does some things differently. (Although from what I understand explicitly codifies a number of ideas that experienced C++ devs have in their heads as "good practice".) I think you'll want to study up on how memory works. One of my favorite resources for this is Logan Smith's Youtube channel. Those videos get me thinking about how this stuff I take for granted really works. The first two Rust videos on there, Use Arc Instead of Vec and Choose the Right Option are good ones to watch. Even if you opt not to use Arc<[T]>
or Box
it's useful to understand how those differ from Vec
and String
.
Closures are weird in Rust, and are worth understanding. You have to choose between Fn
, FnMut
, and FnOnce
. Plus there is the move
keyword. I love the post Finding Closure in Rust for explaining what's going on there. (It takes the implement-your-own-version approach which is a genre where I've incidentally seen some other gems, like Implementing a simple Promise in Javascript, and The Git Parable for understanding how git really works.)
Another area that is helpful to study is Rust's implementation of async
. It is similar to async
as you've seen it before, but also different. For example in Javascript when you call an async function like, say, fetch
it dispatches network requests right away. But in Rust a Future
does not do anything until you call await
on it. Learning about async
leads into understanding of some more general language features. At the shallower end you learn about functions that return types based on trait, like impl Future
or Box>
because Future types often can't be named directly so you have to describe what trait they implement instead. (This is very similar to how you work with functions that return closures.) At the deeper end you learn about working with Pin
. You can get a deep dive on that in Pin and suffering by fasterthanlime. All of that guy's posts are useful, but they are deep plunges so it can take some motivation to read them.
Since I seem to be recommending people to learn from I'll add Mara Bos' blog. She's the Rust Library team lead. Her blog gets into some of the nitty-gritty stuff that gets you thinking about the language on a deeper level. She also wrote a book recently, Rust Atomics And Locks. I haven't read it yet, but it looks useful.
Hey, you're on a similar path to me. I've been on a Rust job for the past year.
Being a general-purpose programming language Rust can be used in a lot of contexts. The work I'm doing is all API server stuff, which I'm sure you already have a solid background in. There are some niches where Rust stands out that might be worth studying depending on your interest, but none of these are essential to Rust work generally.
- Crypto startups seem to be enthusiastic adopters of Rust. It's not an area I want to get into personally, but this is likely the fastest path to a Rust job.
- Rust is probably the best language for compiling to WASM for running in browsers, in lightweight server-less functions, and as plugins. That could dovetail with your frontend experience. Although it's a bit of an uphill battle to argue for WASM over Javascript in these cases.
- Rust makes an appealing choice for embedded programming as a safer alternative to C. This kind of work involves learning to program with
nostd
, and learning about controlling hardware. - In non-embedded systems low-level pieces like device drivers are another good candidate for Rust.
Wayland replaces the older X protocol. It doesn't have to operate with older protocols. You might be thinking of XWayland which is a proxy that receives X API calls from apps written for X, and translates those to the Wayland API so that those apps can run under Wayland implementations. Window managers can optionally run XWayland, and many do. But as more apps are updated to work natively with Wayland, XWayland becomes less important, and might fade away someday.
PipeWire replaces PulseAudio (the most popular sound server before PipeWire). Systems running PipeWire often run pipewire-pulse which does basically the same thing that XWayland does - it translates from the PulseAudio API to the PipeWire API. It's a technically optional, but realistically necessary compatibility layer that may become less relevant over time if apps tend to update to work with PipeWire natively.
So no, both Wayland and PipeWire are capable of operating independently of other protocols.
Oh this is just the thing for playing bard, and casting "vicious mockery" several times per combat
The justification for invading Iraq was a claim that they were developing nuclear weapons. It was well known at the time that the evidence was flimsy, and that even if true it was a flimsy excuse for an invasion. The main piece of evidence was an intercepted shipment of aluminum tubes that were soon shown to have nothing to do with a nuclear program. (See https://en.m.wikipedia.org/wiki/Iraqi_aluminum_tubes). That one is not a conspiracy theory.
It looks like there is at least one work-in-pprogress implementation. I found a Hacker News comment that points to github.com/n0-computer/iroh
That's pretty neat! But it seems to me it's not storage because they're not putting energy in to get out later. It's more like mining naturally-occurring potential energy from the Earth's crust. Probably that potential energy formed millions of years ago when tectonic plate activity pushed the rock up to its present elevation. So - it's geothermal energy with extra steps.
I like to use Obsidian for this kind of thing. It has tagging, and you can link notes and see the network of links in a visualizer. There's also a "canvas" feature that lets you lay out notes spatially in whatever way makes sense to you. I assume there is a web clipping plugin which could make it easy to grab the comment content and link at the same time.
NixOS puts your full system configuration in a portable set of files. You can easily reproduce the same configuration on another machine. I also like that instead of accumulating a growing list of packages that I don't remember why I installed I have package lists specified in files with comments, and split into modules that I can enable or disable.
IMO NixOS works best when you also use Home Manager to apply the same benefits to your user app configurations and such. (OTOH you can use Home Manager to get those benefits without NixOS. But I like that I get consistency between the OS-level and user-level configurations, and that both use the same set of packages.) I use Home Manager to manage my list of installed packages, my dot files, Gnome settings, Firefox about:config
settings, and so on.
You might be installing packages imperatively with nix profile install
or with nix env -i
. If that's the case you're not going to see the full benefits of a declarative system in my opinion. I prefer to install packages by editing my Home Manager configuration and running home-manager switch
.
I like that NixOS + Home Manager automates stuff that I used to do by hand. A couple of the things that I do or have done are to,
- test an experimental window manager, Niri
- use Neovide (a GUI frontend for Neovim) with a custom patch to tweak font rendering
Now I have that kind of stuff automated:
- Since there was no packaging for Niri when I started trying it I wrote my own in my NixOS config with a NixOS module to set up a systemd unit to run it. Because Nix packages are effectively build scripts, whenever I update Nix automatically pulls the latest version of Niri and compiles it without me having to think about it anymore.
- I use the Neovide package from nixpkgs with an override to compile with my custom patch. Like with Niri my configuration automatically gets the latest Neovide version and builds it with my patch when I update, and I don't have to think about it anymore. I use this overlay to do that:
nix
modifications = final: prev: { neovide = final.neovide.overrideAttrs (oldAttrs: { patches = (oldAttrs.patches or [ ]) ++ [ ./neovide-font-customization.patch ]; }); };
You can see that I compile some things from source. That's fine on my desktop, but takes a while on my travel laptop. But I don't need to compile on my laptop because I can use Nix's binary cache feature. I push my NixOS and Home Manager configurations to Github, and I have Garnix build everything that I push. Garnix stores everything it builds in a binary cache. So when I pull my latest configuration version on my laptop it downloads binaries from that cache.
I'd sure want to be very careful with health-risk assessments. But nickel-63 is pretty low-energy. According to this fact sheet absorbed radiation from exposure to skin is negligible without shielding. And that level of radiation is easy to shield so the battery casing presumably blocks all of it. (Tbf I believe fact sheets like that assume that your dead layer of surface skin cells has a small shielding effect, so the calculation is different if it gets in your body.)
The article also mentioned a possible variation with strontium-90 which is stronger stuff. It's emissions are 8 times more energetic than Ni-63, and instead of decaying to stable copper, strontium-90 decays to yttrium-90 which emits radiation several times again more energetic than strontium-90. Here's another fact sheet. (Sorry about using two different sources for fact sheets. I had a hard time finding one source with facts on both isotopes.)
The term "radioactive waste" suggests products from uranium fission, and the isotopes they decay to which can have extremely high-energy emissions, and decay through chains of several radioactive isotopes before finally decaying to stable elements which means extremely long half-lives overall. IMO the comparison is misleading. It's kinda like comparing one "moderate" air quality day to many days inside a smoke stack.
Thanks for the heads-up!
Sharing the link because it took me a minute to find it: https://codeberg.org/dnkl/fuzzel
"Atomic" is a catchy descriptor! Atomic distros for the Atomic Age! It could be an umbrella term since NixOS and Guix are atomic, but instead of images and partitions they use symlinks, and patch binaries to use full paths for libraries and programs that they reference. So there are image-based distros, and I guess expression-derived distros which are both atomic.
I haven't tried image-based distros. This post fills in some gaps for me. Thanks for the write-up!