forked from nico/dots
104 lines
3.1 KiB
Nix
104 lines
3.1 KiB
Nix
{ ... }:
|
|
|
|
{
|
|
disko.devices = {
|
|
disk = {
|
|
main = {
|
|
type = "disk";
|
|
device = "/dev/nvme0n1";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
ESP = {
|
|
size = "512M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = [ "umask=0077" ];
|
|
};
|
|
};
|
|
luks = {
|
|
size = "100%";
|
|
content = {
|
|
type = "luks";
|
|
name = "root";
|
|
passwordFile = "/tmp/secret.key";
|
|
settings = {
|
|
allowDiscards = true;
|
|
};
|
|
# additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
|
content = {
|
|
type = "btrfs";
|
|
extraArgs = [ "-f" ];
|
|
subvolumes = {
|
|
"/root" = {
|
|
mountpoint = "/";
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
};
|
|
"/home" = {
|
|
mountpoint = "/home";
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
};
|
|
"/nix" = {
|
|
mountpoint = "/nix";
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
};
|
|
"/swap" = {
|
|
mountpoint = "/.swapvol";
|
|
swap.swapfile.size = "1G";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
media = {
|
|
type = "disk";
|
|
device = "/dev/sda";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
luks = {
|
|
size = "100%";
|
|
content = {
|
|
type = "luks";
|
|
name = "media";
|
|
settings = {
|
|
allowDiscards = true;
|
|
fallbackToPassword = false;
|
|
keyFile = "/sysroot/var/lib/disk-media.key";
|
|
};
|
|
content = {
|
|
type = "btrfs";
|
|
extraArgs = [ "-f" ];
|
|
subvolumes = {
|
|
"/media/shows" = {
|
|
mountpoint = "/media/shows";
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
};
|
|
"/media/movies" = {
|
|
mountpoint = "/media/movies";
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
};
|
|
"/media/music" = {
|
|
mountpoint = "/media/music";
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
};
|
|
"/media/books" = {
|
|
mountpoint = "/media/books";
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|