why disko why

This commit is contained in:
Gerg-L 2023-08-21 22:50:22 -04:00
parent 5fd79726e7
commit 1d77028ac5

View file

@ -1,30 +1,32 @@
{disko, ...}: {
imports = [disko.nixosModules.disko];
disko.devices = {
disk.sda = {
device = "/dev/disk/by-id/ata-WDC_WDS240G2G0A-00JH30_180936803144";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
start = "1MiB";
end = "1GiB";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
disko.devices.disk.sda = let
baseDevice = "/dev/disk/by-id/ata-WDC_WDS240G2G0A-00JH30_180936803144";
in {
device = baseDevice;
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
device = "${baseDevice}-part1";
start = "1MiB";
end = "1GiB";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
root = {
start = "1GiB";
end = "100%";
type = "EF00";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
root = {
device = "${baseDevice}-part2";
start = "1GiB";
end = "100%";
type = "EF00";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};