nixos-config/scripts/disko-config-cream.nix
Ingolf Wagner 19581c7620
add cream
2023-02-13 18:40:56 +01:00

104 lines
2.3 KiB
Nix

# nix run github:nix-community/disko -- --mode create ./disko-config-cream.nix --dry-run
# nix run github:nix-community/disko -- --mode mount ./disko-config-cream.nix --dry-run
# nixos-generate-config --root /mnt/
# vim /mnt/configuration.nix
# nixos-install --root /mnt
{ ... }:
{
disk = {
nvme0n1 = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "table";
format = "gpt";
partitions = [
{
type = "partition";
name = "ESP";
start = "1MiB";
end = "500MiB";
bootable = true;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
}
{
type = "partition";
name = "luks";
start = "500MiB";
end = "100%";
content = {
type = "luks";
name = "pool";
#keyFile = "/tmp/secret.key";
content = {
type = "lvm_pv";
vg = "pool";
};
};
}
];
};
};
sdb = {
type = "disk";
device = "/dev/sdb";
content = {
type = "table";
format = "gpt";
partitions = [
{
type = "partition";
name = "removable";
start = "1MiB";
end = "100%";
bootable = false;
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/removable";
mountOptions = [
"defaults"
];
};
}
];
};
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
root = {
type = "lvm_lv";
size = "100G";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [
"defaults"
];
};
};
home = {
type = "lvm_lv";
size = "150G";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/home";
};
};
};
};
};
}