mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-22 00:21:34 +01:00
63 lines
1.4 KiB
Nix
63 lines
1.4 KiB
Nix
{ inputs, ... }:
|
|
{
|
|
imports = [ inputs.disko.nixosModules.default ];
|
|
|
|
disko.devices = {
|
|
disk.main = {
|
|
type = "disk";
|
|
device = "/dev/nvme0n1";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
ESP = {
|
|
type = "EF00";
|
|
size = "512M";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = [ "defaults" ];
|
|
};
|
|
};
|
|
luks = {
|
|
size = "100%";
|
|
content = {
|
|
name = "cryptroot";
|
|
type = "luks";
|
|
settings = {
|
|
allowDiscards = true;
|
|
bypassWorkqueues = true;
|
|
};
|
|
passwordFile = "/tmp/secret.key";
|
|
content = {
|
|
type = "lvm_pv";
|
|
vg = "pool";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
lvm_vg.pool = {
|
|
type = "lvm_vg";
|
|
lvs = {
|
|
swap = {
|
|
size = "20G";
|
|
content = {
|
|
type = "swap";
|
|
resumeDevice = true;
|
|
};
|
|
};
|
|
root = {
|
|
size = "100%FREE";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
mountOptions = [ "defaults" ];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|