| 10 May 2026 |
trumee | For a file offset is needed it seems. | 17:39:13 |
sudoforge | yes | 17:42:54 |
Albert Larsan | Also why I don’t bother with swapfiles, only a swap partition | 17:43:49 |
Albert Larsan | Don’t have to find the offset (and make sure btrfs doesn’t break the file) | 17:44:14 |
sudoforge | for sure, a swap partition is simpler | 17:44:18 |
sudoforge | trumee since you seem newer to all of this i'm going to recommend that you use a swap partition | 17:44:39 |
sudoforge | make it a little bigger than the RAM you have on the machine (or the RAM you plan to have on the machine) | 17:50:56 |
sudoforge | i guess, this is where the lvm-under-luks-before-your-fs comes into play | 17:51:13 |
Albert Larsan | You can only have a single hibernation swap, so add your ram and all other swap (including zram if you use that), add a little overhead, and you end up with 64GB of swap for 24 GB of RAM :) | 17:53:07 |
sudoforge | i have 64GiB of RAM (i bought it before the rampocalypse, don't hurt me) and haven't ran into issues with 72GiB | 17:55:19 |
sudoforge | but yeah | 17:55:20 |
Albert Larsan | Good for you, I really want to steal a 16G stick from another one of my laptops. | 17:56:31 |
Albert Larsan | I only need like 16 on it (for The Sims 3) | 17:56:57 |
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 |