51 lines
1.3 KiB
Nix
51 lines
1.3 KiB
Nix
{ config, inputs, ... }: {
|
|
imports = [
|
|
inputs.disko.nixosModules.disko
|
|
];
|
|
disko.devices.disk.nvme = {
|
|
device = "/dev/vda";
|
|
type = "disk";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
BOOT = {
|
|
type = "EF00";
|
|
size = "512M";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = [ "defaults" ];
|
|
};
|
|
};
|
|
crypt = {
|
|
size = "100%";
|
|
content = {
|
|
name = "nixos";
|
|
type = "luks";
|
|
settings.allowDiscards = true;
|
|
settings.keyFile = "/tmp/disk.key";
|
|
content = {
|
|
type = "btrfs";
|
|
extraArgs = [ "-f" ];
|
|
subvolumes = {
|
|
"nixos" = {
|
|
mountpoint = "/";
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
};
|
|
"home" = {
|
|
mountpoint = "/home";
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
};
|
|
"nix" = {
|
|
mountpoint = "/nix";
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|