86 lines
2.1 KiB
Nix
86 lines
2.1 KiB
Nix
{ lib, ... }:
|
|
let
|
|
disk-id = "scsi-0QEMU_QEMU_HARDDISK_110162268";
|
|
data-id = "scsi-0HC_Volume_104473479";
|
|
in
|
|
{
|
|
disko.devices = {
|
|
|
|
# --- DISK 1: MAIN OS (38GB) ---
|
|
disk.main = {
|
|
# You were right! This IS the correct ID for the 38GB drive.
|
|
device = "/dev/disk/by-id/${disk-id}";
|
|
type = "disk";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
boot = {
|
|
size = "1M";
|
|
type = "EF02";
|
|
priority = 1;
|
|
};
|
|
ESP = {
|
|
size = "512M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
};
|
|
};
|
|
root = {
|
|
size = "100%";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
disk.volume = {
|
|
# This is the ID for your volume (from your ls output)
|
|
device = "/dev/disk/by-id/${disk-id}";
|
|
type = "disk";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
data = {
|
|
size = "100%";
|
|
content = {
|
|
type = "btrfs";
|
|
extraArgs = [ "-f" ];
|
|
mountpoint = "/mnt/data";
|
|
subvolumes = {
|
|
"@postgresql" = {
|
|
mountpoint = "/mnt/data/postgresql";
|
|
mountOptions = [
|
|
"nodatacow"
|
|
"noatime"
|
|
];
|
|
};
|
|
"@forgejo" = {
|
|
mountpoint = "/mnt/data/forgejo";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
"@immich" = {
|
|
mountpoint = "/mnt/data/immich";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
};
|
|
}
|