66 lines
1.5 KiB
Nix
66 lines
1.5 KiB
Nix
{ lib, ... }:
|
|
{
|
|
disko.devices = {
|
|
disk.disk0 = {
|
|
device = "/dev/disk/by-id/ata-SAMSUNG_MZ7TE512HMHP-000L1_S1GJNSAG201058";
|
|
type = "disk";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
boot = {
|
|
name = "boot";
|
|
size = "1M";
|
|
type = "EF02";
|
|
};
|
|
esp = {
|
|
name = "ESP";
|
|
size = "500M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
};
|
|
};
|
|
luks = {
|
|
name = "root";
|
|
size = "300G";
|
|
content = {
|
|
type = "luks";
|
|
name = "nixos-encrypted";
|
|
extraOpenArgs = [];
|
|
settings = {
|
|
allowDiscards = true;
|
|
# Not specifying a passwordFile lets me interactively enter a password
|
|
};
|
|
content = {
|
|
type = "lvm_pv";
|
|
vg = "encpool";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
lvm_vg = {
|
|
encpool = {
|
|
type = "lvm_vg";
|
|
lvs = {
|
|
root = {
|
|
size = "100%FREE"; # expand later if needed
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
mountOptions = [
|
|
"defaults"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|