Update disk-config
This commit is contained in:
parent
9869100b8e
commit
1c07fd9fb9
1 changed files with 66 additions and 77 deletions
143
disk-config.nix
143
disk-config.nix
|
@ -1,86 +1,75 @@
|
||||||
{
|
{
|
||||||
disko.devices = {
|
disko.devices =
|
||||||
disk = {
|
let
|
||||||
one = {
|
mirrorContent = {
|
||||||
type = "disk";
|
type = "gpt";
|
||||||
device = "/dev/nvme0n1";
|
partitions = {
|
||||||
content = {
|
boot = {
|
||||||
type = "gpt";
|
size = "1M";
|
||||||
partitions = {
|
type = "EF02"; # for grub MBR
|
||||||
boot = {
|
|
||||||
size = "500M";
|
|
||||||
type = "EF00";
|
|
||||||
content = {
|
|
||||||
type = "mdraid";
|
|
||||||
name = "boot";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
primary = {
|
|
||||||
size = "100%";
|
|
||||||
content = {
|
|
||||||
type = "lvm_pv";
|
|
||||||
vg = "pool";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
ESP = {
|
||||||
};
|
size = "500M";
|
||||||
two = {
|
type = "EF00";
|
||||||
type = "disk";
|
|
||||||
device = "/dev/nvme1n1";
|
|
||||||
content = {
|
|
||||||
type = "gpt";
|
|
||||||
partitions = {
|
|
||||||
boot = {
|
|
||||||
size = "500M";
|
|
||||||
type = "EF00";
|
|
||||||
content = {
|
|
||||||
type = "mdraid";
|
|
||||||
name = "boot";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
primary = {
|
|
||||||
size = "100%";
|
|
||||||
content = {
|
|
||||||
type = "lvm_pv";
|
|
||||||
vg = "pool";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
mdadm = {
|
|
||||||
boot = {
|
|
||||||
type = "mdadm";
|
|
||||||
level = 1;
|
|
||||||
metadata = "1.0";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/boot";
|
|
||||||
mountOptions = [ "umask=0077" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
lvm_vg = {
|
|
||||||
pool = {
|
|
||||||
type = "lvm_vg";
|
|
||||||
lvs = {
|
|
||||||
root = {
|
|
||||||
size = "100%";
|
|
||||||
lvm_type = "mirror";
|
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "mdraid";
|
||||||
format = "ext4";
|
name = "boot";
|
||||||
mountpoint = "/";
|
};
|
||||||
mountOptions = [
|
};
|
||||||
"defaults"
|
primary = {
|
||||||
];
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "lvm_pv";
|
||||||
|
vg = "pool";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
disk = {
|
||||||
|
one = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/nvme0n1";
|
||||||
|
content = mirrorContent;
|
||||||
|
};
|
||||||
|
two = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/nvme1n1";
|
||||||
|
content = mirrorContent;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mdadm = {
|
||||||
|
boot = {
|
||||||
|
type = "mdadm";
|
||||||
|
level = 1;
|
||||||
|
metadata = "1.0";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lvm_vg = {
|
||||||
|
pool = {
|
||||||
|
type = "lvm_vg";
|
||||||
|
lvs = {
|
||||||
|
root = {
|
||||||
|
size = "100%";
|
||||||
|
lvm_type = "mirror";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/";
|
||||||
|
mountOptions = [
|
||||||
|
"defaults"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue