| 10 Nov 2025 |
no-mood | Okay I'm going crazy, I just reinstalled my system with nixos-anywhere since it didn't boot anymore | 18:01:38 |
no-mood | I get:
Stage 2 init script (/mnt-root/nix/store/... not found) | 18:02:03 |
no-mood | This is my config:
{ inputs, ... }:
let
ssdDevice = "/dev/disk/by-id/nvme-SAMSUNG_MZVLB256HAHQ-000H1_S425NX2M363531";
hddDevice = "/dev/disk/by-id/ata-ST2000DM008-2UB102_ZK20P7NY";
wdDevice = "/dev/disk/by-id/ata-WDC_WD10EARS-00Y5B1_WD-WCAV5S128768";
in
{
imports = [
inputs.disko.nixosModules.disko
];
boot.supportedFilesystems = [ "bcachefs" ];
disko.devices = {
disk = {
# NVMe SSD - Fast tier for metadata and caching
nvme = {
type = "disk";
device = ssdDevice;
content = {
type = "gpt";
partitions = {
ESP = {
priority = 1;
name = "ESP";
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
# NVMe partition for bcachefs (fast tier)
main = {
size = "100%";
content = {
type = "bcachefs";
filesystem = "main_bcachefs";
label = "ssd.nvme";
extraFormatArgs = [ "--discard" ];
};
};
};
};
};
# HDD - Bulk storage tier
hdd = {
type = "disk";
device = hddDevice;
content = {
type = "gpt";
partitions = {
# HDD partition for bcachefs (storage tier)
main = {
size = "100%";
content = {
type = "bcachefs";
filesystem = "main_bcachefs";
label = "hdd.storage";
};
};
};
};
};
# Western Digital HDD - Separate btrfs filesystem
WD10EARS = {
type = "disk";
device = wdDevice;
content = {
type = "gpt";
partitions = {
main = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"@" = {
mountpoint = "/mnt/wd10ears";
mountOptions = [
"compress=zstd"
"noatime"
];
};
};
};
};
};
};
};
};
bcachefs_filesystems = {
main_bcachefs = {
type = "bcachefs_filesystem";
extraFormatArgs = [
"--compression=lz4"
"--background_compression=zstd:6"
# Tiering configuration
"--background_target=hdd"
"--foreground_target=ssd"
"--promote_target=ssd"
"--metadata_target=ssd"
];
subvolumes = {
# Root filesystem - equivalent to @root
"@root" = {
mountpoint = "/";
mountOptions = [
"noatime"
];
};
# Nix store - equivalent to @nix
"@nix" = {
mountpoint = "/nix";
mountOptions = [
"noatime"
];
};
# Backups directory
"@backups" = {
mountpoint = "/var/backups";
mountOptions = [
"noatime"
];
};
};
};
};
};
}
| 18:02:47 |
no-mood | I've discussed this in #users:nixos.org and it seems that subvolumes are created but are not used; all my files store in the root, and the subvolumes are empty | 18:04:14 |
no-mood | * Okay I'm going crazy, I just reinstalled my system with nixos-anywhere (using bcachefs) since it didn't boot anymore | 18:04:32 |