| 10 May 2026 |
sudoforge | i do have 2x16GB SODIMM i have been puzzled about what i'd use it for | 17:58:56 |
sudoforge | so, i mean | 17:59:13 |
sudoforge | i'd sell it if you need it. at a reasonable price (1 or two bitcoins) | 17:59:33 |
sudoforge | * i'd sell it if you need it. at a reasonable price (1 or 2 bitcoins) | 17:59:40 |
Albert Larsan | DDR5 5600? | 18:00:46 |
sudoforge | yep | 18:00:53 |
Albert Larsan | My FW runs at 4800 because the only stick of DDR5 I had available was a 8G DDR5 4800 from said other laptop from when I upgraded it to 32 GB of RAM | 18:02:03 |
sudoforge | DM'ed ya, we can continue there | 18:03:19 |
trumee | Can the swap partition be a btrfs subvolume and work for hibernate? | 18:20:19 |
Albert Larsan | 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 |
trumee | Ah ok, then I should use lvm to create a partition | 18:27:06 |
sudoforge | yeah, that'll be simpler and avoid the pitfalls of using a swap file | 18:30:59 |
sudoforge | so you'll have (assuming you're adjusting to using a single luks container as discussed earlier):
/dev/nvme0n1p1 -> a fat32 partition for your esp
/dev/nvme0n1p2 -> a luks container
lvm
swap
zfs for /
| 18:34:06 |
trumee | sudoforge: i wiped out my laptop and trying to create btrfs system. Why does nix detect my home subvolume?,
[nix-shell:~]# btrfs subvolume list /mnt
ID 257 gen 24 top level 5 path root
ID 258 gen 10 top level 5 path home
ID 259 gen 10 top level 5 path nix
[nix-shell:~]# nixos-generate-config --show-hardware-config
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" "usbhid" "uas" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/mapper/cryptroot";
fsType = "ext4";
};
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/ca6a879a-b6a8-402d-a73a-8bf47982f3d6";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/AF16-5E1D";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/mnt" =
{ device = "/dev/mapper/pool-root";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/mnt/boot" =
{ device = "/dev/disk/by-uuid/534B-D397";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices =
[ { device = "/dev/mapper/pool-swap"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
| 20:29:29 |
trumee | * sudoforge: i wiped out my laptop and trying to create btrfs system. Why does nix detect my home subvolume?,
[nix-shell:~]# btrfs subvolume list /mnt
ID 257 gen 25 top level 5 path root
ID 258 gen 10 top level 5 path home
ID 259 gen 10 top level 5 path nix
[nix-shell:~]# nixos-generate-config --root /mnt --show-hardware-config
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" "usbhid" "uas" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/mapper/pool-root";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/534B-D397";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices =
[ { device = "/dev/mapper/pool-swap"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
| 20:31:48 |
Albert Larsan | Is the home subvolume actually mounted at /mnt/home? | 20:33:58 |
trumee | This is my setup,
[nix-shell:~]# lsblk /dev/nvme1n1
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme1n1 259:1 0 1.8T 0 disk
├─nvme1n1p1 259:2 0 2G 0 part /mnt/boot
└─nvme1n1p2 259:3 0 1.8T 0 part
└─cryptdisk 254:3 0 1.8T 0 crypt
├─pool-swap 254:4 0 98G 0 lvm [SWAP]
└─pool-root 254:5 0 1.7T 0 lvm /mnt
| 20:33:58 |
trumee | looks like i am missing a crucial step. | 20:34:46 |
Albert Larsan | 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 |
trumee | how do i mount the subvolume? | 20:35:15 |
Albert Larsan | sudo mount -m -o subvol=home,noatime /dev/mapper/pool-root /mnt/home
sudo mount -m -o subvol=nix,noatime /dev/mapper/pool-root /mnt/nix | 20:36:53 |
sudoforge | ah, albert got it out as i was responding :) | 20:37:31 |
sudoforge | also, i'd strongly encourage you to use disko | 20:37:36 |
Albert Larsan | 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 |
sudoforge | the config i shared earlier doesn't include LVM under the luks container but can be a great starting point | 20:38:06 |
sudoforge | mount -t btrfs -o defaults,ssd,noatime,compress=zstd:3,subvol=/home /dev/mapper/pool-root /mnt/home
is what i would do
| 20:38:33 |
Albert Larsan | 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 |
sudoforge | ah you're not setting up encryption with disko? tsk tsk | 20:41:05 |
Albert Larsan | 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 |
Albert Larsan | 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 |