NixOS + Framework | 225 Members | |
| Discussing NixOS in the context of the Framework laptop | 50 Servers |
| Sender | Message | Time |
|---|---|---|
| 10 May 2026 | ||
| Btrfs subvolumes are, in some way, directories. They have some properties, like being snapshottable and mount those directories from the base hierarchy without having to resort to bind mounts. It would still be a swap file in a folder, with the hassle of finding the offset (although FWIH it seems easier on btrfs new) | 18:23:31 | |
| Ah ok, then I should use lvm to create a partition | 18:27:06 | |
| yeah, that'll be simpler and avoid the pitfalls of using a swap file | 18:30:59 | |
| so you'll have (assuming you're adjusting to using a single luks container as discussed earlier):
| 18:34:06 | |
| sudoforge: i wiped out my laptop and trying to create btrfs system. Why does nix detect my home subvolume?,
| 20:29:29 | |
| * sudoforge: i wiped out my laptop and trying to create btrfs system. Why does nix detect my home subvolume?,
| 20:31:48 | |
| Is the home subvolume actually mounted at /mnt/home? | 20:33:58 | |
| This is my setup,
| 20:33:58 | |
| looks like i am missing a crucial step. | 20:34:46 | |
| If the subvolume isn’t mounted, then nix can’t infer that you want the home submodule at /home and the nix submodule at /nix | 20:35:01 | |
| how do i mount the subvolume? | 20:35:15 | |
sudo mount -m -o subvol=home,noatime /dev/mapper/pool-root /mnt/homesudo mount -m -o subvol=nix,noatime /dev/mapper/pool-root /mnt/nix | 20:36:53 | |
| ah, albert got it out as i was responding :) | 20:37:31 | |
| also, i'd strongly encourage you to use disko | 20:37:36 | |
| Don’t forget to add noatime to the options in the generated nixos-hardware config, otherwise the SSD will get hammered by writes every time you read something | 20:37:59 | |
| the config i shared earlier doesn't include LVM under the luks container but can be a great starting point | 20:38:06 | |
is what i would do | 20:38:33 | |
| https://git.sr.ht/~albertlarsan68/dotfiles/tree/flake-parts/item/disko-configurations/ginkgo-grid.nix is what I use, just remove disk2 and adapt the swap size | 20:39:23 | |
| ah you're not setting up encryption with disko? tsk tsk | 20:41:05 | |
I have VPSes that only have 15G of disk space. On them I run compress-force=zstd:15. Absolutely atrocious write performance, but really small disk usage (2 gigs for a full server) | 20:41:24 | |
| Hey, it is not my fault that the disko documentation is inexistant! Also, I really like systemd-cryptsetup. This is a server, it has a few steps before I can enroll the TPM (namely re-activating Secure Boot, once Lanzaboote is working, etc.) So yes, I setup encryption well after disko has done its job. | 20:43:21 | |
| At least lvm has a passphrase | 20:43:33 | |
| From the start | 20:43:38 | |
disko just hands off to systemd-cryptsetup | 20:43:53 | |
| I can’t provision the TPM from the install media AFAIK | 20:44:40 | |
| My original setup came from someone else, and there were even more manual steps (see https://web.archive.org/web/20250919060007/https://github.com/kjhoerr/dotfiles/wiki/NixOS:-Instructions-for-adding-a-new-system) | 20:48:02 | |
| Apparently the repo I took from disappeared | 20:48:41 | |
| ah, that's right, you can't use the TPM device from the installation media | 20:49:12 | |
| hmm | 20:49:40 | |
| well, you could disko to set up the initial encryption for it (passphrase or key file or security key), i guess | 20:50:03 | |