try adding disk

This commit is contained in:
2025-07-31 14:35:53 -05:00
parent 8cf39d21e6
commit 4168dffb05
2 changed files with 140 additions and 104 deletions

View File

@@ -7,7 +7,7 @@
inputs.disko.nixosModules.default
(import ./disko.nix { device1 = "/dev/nvme0n1"; device2 = "/dev/nvme1n1"; })
(import ./disko.nix { device1 = "/dev/nvme0n1"; device2 = "/dev/nvme1n1"; device3 = "/dev/sda"; })
inputs.impermanence.nixosModules.impermanence

View File

@@ -1,6 +1,7 @@
{
device1 ? throw "Set this to your disk device, e.g. /dev/sda",
device2,
device3,
...
}: {
disko.devices = {
@@ -61,6 +62,23 @@
};
};
};
hdd1 = {
device = device3;
type = "disk";
content = {
type = "gpt";
partitions = {
ssd1 = {
name = "hdd1";
size = "100%";
content = {
type = "lvm_pv";
vg = "hdd1_vg";
};
};
};
};
};
};
lvm_vg = {
root_vg = {
@@ -109,6 +127,24 @@
};
};
};
hdd1_vg = {
type = "lvm_vg";
lvs = {
ssd1 = {
size = "100%FREE";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/hdd1" = {
mountOptions = [ "subvol=hdd1" "noatime" ];
mountpoint = "/hdd1";
};
};
};
};
};
};
};
};
}