try adding disk
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
inputs.disko.nixosModules.default
|
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
|
inputs.impermanence.nixosModules.impermanence
|
||||||
|
|
||||||
|
|||||||
@@ -1,114 +1,150 @@
|
|||||||
{
|
{
|
||||||
device1 ? throw "Set this to your disk device, e.g. /dev/sda",
|
device1 ? throw "Set this to your disk device, e.g. /dev/sda",
|
||||||
device2,
|
device2,
|
||||||
|
device3,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
main = {
|
main = {
|
||||||
device = device1;
|
device = device1;
|
||||||
type = "disk";
|
type = "disk";
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
boot = {
|
boot = {
|
||||||
name = "boot";
|
name = "boot";
|
||||||
size = "1M";
|
size = "1M";
|
||||||
type = "EF02";
|
type = "EF02";
|
||||||
};
|
};
|
||||||
esp = {
|
esp = {
|
||||||
name = "ESP";
|
name = "ESP";
|
||||||
size = "500M";
|
size = "500M";
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "vfat";
|
format = "vfat";
|
||||||
mountpoint = "/boot";
|
mountpoint = "/boot";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
swap = {
|
swap = {
|
||||||
size = "4G";
|
size = "4G";
|
||||||
content = {
|
content = {
|
||||||
type = "swap";
|
type = "swap";
|
||||||
resumeDevice = true;
|
resumeDevice = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
root = {
|
root = {
|
||||||
name = "root";
|
name = "root";
|
||||||
size = "100%";
|
size = "100%";
|
||||||
content = {
|
content = {
|
||||||
type = "lvm_pv";
|
type = "lvm_pv";
|
||||||
vg = "root_vg";
|
vg = "root_vg";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
ssd1 = {
|
ssd1 = {
|
||||||
device = device2;
|
device = device2;
|
||||||
type = "disk";
|
type = "disk";
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
ssd1 = {
|
ssd1 = {
|
||||||
name = "ssd1";
|
name = "ssd1";
|
||||||
size = "100%";
|
size = "100%";
|
||||||
content = {
|
content = {
|
||||||
type = "lvm_pv";
|
type = "lvm_pv";
|
||||||
vg = "ssd1_vg";
|
vg = "ssd1_vg";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
hdd1 = {
|
||||||
lvm_vg = {
|
device = device3;
|
||||||
root_vg = {
|
type = "disk";
|
||||||
type = "lvm_vg";
|
content = {
|
||||||
lvs = {
|
type = "gpt";
|
||||||
root = {
|
partitions = {
|
||||||
size = "100%FREE";
|
ssd1 = {
|
||||||
content = {
|
name = "hdd1";
|
||||||
type = "btrfs";
|
size = "100%";
|
||||||
extraArgs = ["-f"];
|
content = {
|
||||||
|
type = "lvm_pv";
|
||||||
subvolumes = {
|
vg = "hdd1_vg";
|
||||||
"/root" = {
|
};
|
||||||
mountpoint = "/";
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
"/persist" = {
|
|
||||||
mountOptions = ["subvol=persist" "noatime"];
|
|
||||||
mountpoint = "/persist";
|
|
||||||
};
|
|
||||||
|
|
||||||
"/nix" = {
|
|
||||||
mountOptions = ["subvol=nix" "noatime"];
|
|
||||||
mountpoint = "/nix";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
ssd1_vg = {
|
lvm_vg = {
|
||||||
type = "lvm_vg";
|
root_vg = {
|
||||||
lvs = {
|
type = "lvm_vg";
|
||||||
ssd1 = {
|
lvs = {
|
||||||
size = "100%FREE";
|
root = {
|
||||||
content = {
|
size = "100%FREE";
|
||||||
type = "btrfs";
|
content = {
|
||||||
extraArgs = [ "-f" ];
|
type = "btrfs";
|
||||||
subvolumes = {
|
extraArgs = ["-f"];
|
||||||
"/ssd1" = {
|
|
||||||
mountOptions = [ "subvol=ssd1" "noatime" ];
|
subvolumes = {
|
||||||
mountpoint = "/ssd1";
|
"/root" = {
|
||||||
};
|
mountpoint = "/";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
"/persist" = {
|
||||||
};
|
mountOptions = ["subvol=persist" "noatime"];
|
||||||
|
mountpoint = "/persist";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/nix" = {
|
||||||
|
mountOptions = ["subvol=nix" "noatime"];
|
||||||
|
mountpoint = "/nix";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
ssd1_vg = {
|
||||||
|
type = "lvm_vg";
|
||||||
|
lvs = {
|
||||||
|
ssd1 = {
|
||||||
|
size = "100%FREE";
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = [ "-f" ];
|
||||||
|
subvolumes = {
|
||||||
|
"/ssd1" = {
|
||||||
|
mountOptions = [ "subvol=ssd1" "noatime" ];
|
||||||
|
mountpoint = "/ssd1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
hdd1_vg = {
|
||||||
|
type = "lvm_vg";
|
||||||
|
lvs = {
|
||||||
|
ssd1 = {
|
||||||
|
size = "100%FREE";
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = [ "-f" ];
|
||||||
|
subvolumes = {
|
||||||
|
"/hdd1" = {
|
||||||
|
mountOptions = [ "subvol=hdd1" "noatime" ];
|
||||||
|
mountpoint = "/hdd1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user