For years I have had a zfs setup on my main workstation that I have really enjoyed. Multiple Linux distros setup to multi-boot from the same zpool with lots of things transparently shared between all of them. Of course, zfs isn’t for everyone and there are a limited number of distros that even support it fully.
As a challenge, I thought I might take a similar approach on my laptop except this time using btrfs. While btrfs lacks many zfs features and conveniences, I believed it would be possible to create a similar setup.
Here is the result:
1 partition + ESP
7 distros
59 subvolumes, 18 of which are shared by all distros
Fully encrypted with luks
Important application configs are completely shared between systems so the system is the same no matter which distro I choose to boot into
What I learned:
It was a little surprising how many features btrfs lacks compared to zfs
It took much longer than I thought it would
More distros than I expected had no support or limited support for btrfs
I was glad I did it in a VM first so I could recover snapshots when needed
Wow, good work! A couple of questions: do you run Plasma between them all? And how does NixOS play with the others, given it has self contained packages?
I can see NixOS always taking up a lot of space because of how it works, it’s in some ways like OS-X in the way packages are contained, although in other ways I guess it’s different. I’ve often looked at their website but haven’t tried it yet
I did install plasma on all of them but I chose not to share the plasma config so they could be different DEs if I wanted that.
It is fine. I don’t run home manager so my home directory on Nixos is pretty much the same as any other. The application files/libraries/binaries are stored radically differently but that doesn’t really have much impact.
That being said, most of my Nixos installs are servers which is where Nixos really shines. Completely automated updates/declarative config/easy rollbacks/no need to worry about version/library conflicts/etc
Hmm…so in a way NixOS is kind of semi-autonomous? Connected yet not affecting the others. It’s a neat setup. I guess it needs an advanced file system of course. I’ll probably try NixOS one day but it will be on another machine (I don’t really like VMs) and at the moment I’ve run out of machines (6 at the moment)
It’s nice to hear of folk trying out things that may not be obvious or easy. It often inspires others too, keep it up mate!
All the distros are autonomous. I can add/remove distros at any time.
To you give you a better idea here is the basic subvolume layout. It would have been easy enough to share more application config, but on my laptop, those are the only applications I care about the config for.
I think (from all I have read on Nixos) that all you need to do is remove your mind, scrub it clean of all knowledge and procedures, and start again on Nixos…! Let us just say - you are a person of rare courage!
I have been using Nixos for quite a while now. These days I mostly use it for server applications but I ran it on my laptop exclusively for about 6 months.
That being said, you are not wrong to think that you need to rethink a lot of what you know when you start using it.
Even worse - you have to rethink what you THINK you know as well! Nifty concept, capably executed - but I came up with 680x0 assembly on the first real multitasking system aimed at home… a rather different mindset!
The biggest one is that, inspired by the recent topic on debian, I added debian testing with the latest plasma and removed nixos.
I decided nixos wasn’t worth the amount of disk space it would use up on my small laptop SSD.
I got snapper configured in all 5 distros.
I learned a few more things:
I have gotten much better at taking distros where the installer doesn’t support this setup in. I suspect I could any distro which supports a btrfs root shoehorned in at this point
I have also learned how to convert most distros to systemd-boot
I am glad I took detailed notes on the whole process because otherwise I would not remember how I did it six months from now
Because almost all the apps I use on my laptop are sharing a config, the time it takes to add a distro and get it configured is amazingly low.
I have also learned that the whole project is mostly pointless.
The sad reality is I have five different Linux distros, each based on different major distro, and because they are all configured the same I don’t even really notice which I am using until I need to do some package management related task. I had to put the logos on the launcher buttons so I would know where I was.