{ config, pkgs, ... }: { boot.loader.systemd-boot.enable = true; fileSystems."/boot" = { device = "/dev/disk/by-label/boot"; fsType = "vfat"; }; fileSystems."/" = { device = "none"; fsType = "tmpfs"; options = [ "size=16G" "mode=755" ]; }; boot.initrd.luks.devices.root = { device = "/dev/disk/by-label/root"; # WARNING: Leaks some metadata, see cryptsetup man page for --allow-discards. allowDiscards = true; # Set your own key with: # cryptsetup luksChangeKey /dev/disk/by-label/root --key-file=/dev/zero --keyfile-size=1 # You can then delete the rest of this block. keyFile = "/dev/zero"; keyFileSize = 1; }; fileSystems."/nix" = { device = "/dev/mapper/root"; fsType = "btrfs"; neededForBoot = true; options = [ "subvol=@" "ssd" "compress=zstd:3" "discard=async" "noatime" ]; }; fileSystems."/nix/store" = { device = "/dev/mapper/root"; fsType = "btrfs"; neededForBoot = true; options = [ "subvol=@nix-store" "ssd" "compress=zstd:3" "discard=async" "noatime" ]; }; fileSystems."/nix/persist" = { device = "/dev/mapper/root"; fsType = "btrfs"; neededForBoot = true; options = [ "subvol=@nix-persist" "ssd" "compress=zstd:3" "discard=async" "noatime" ]; }; }