Fix disko syntax issues and adjust btrfs mount options
This commit is contained in:
@@ -1,65 +1,63 @@
|
|||||||
{
|
let
|
||||||
let
|
installDisk = "sda";
|
||||||
installDisk = "sda";
|
bootPartitionSize = "512M";
|
||||||
bootPartitionSize = "512M";
|
swapfileSize = "34G";
|
||||||
swapfileSize = "34G";
|
in {
|
||||||
in {
|
disko.devices = {
|
||||||
disko.devices = {
|
disk = {
|
||||||
disk = {
|
main = {
|
||||||
main = {
|
type = "disk";
|
||||||
type = "disk";
|
device = "/dev/" + installDisk;
|
||||||
device = "/dev/" + installDisk;
|
content = {
|
||||||
content = {
|
type = "gpt";
|
||||||
type = "gpt";
|
partitions = {
|
||||||
partitions = {
|
ESP = {
|
||||||
ESP = {
|
size = bootPartitionSize;
|
||||||
size = bootPartitionSize;
|
type = "EF00";
|
||||||
type = "EF00";
|
content = {
|
||||||
content = {
|
type = "filesystem";
|
||||||
type = "filesystem";
|
format = "vfat";
|
||||||
format = "vfat";
|
mountpoint = "/boot";
|
||||||
mountpoint = "/boot";
|
mountOptions = [
|
||||||
mountOptions = [
|
"defaults"
|
||||||
"defaults"
|
];
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
luks = {
|
};
|
||||||
size = "100%";
|
luks = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "luks";
|
||||||
|
name = "cryptroot";
|
||||||
|
# disable settings.keyFile if you want to use interactive password entry
|
||||||
|
# passwordFile = "/tmp/secret.key"; # Interactive
|
||||||
|
settings = {
|
||||||
|
allowDiscards = true;
|
||||||
|
# keyFile = "/tmp/secret.key";
|
||||||
|
};
|
||||||
|
# additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
||||||
content = {
|
content = {
|
||||||
type = "luks";
|
type = "btrfs";
|
||||||
name = "cryptroot";
|
extraArgs = [ "-f" ];
|
||||||
# disable settings.keyFile if you want to use interactive password entry
|
subvolumes = {
|
||||||
# passwordFile = "/tmp/secret.key"; # Interactive
|
"@" = {
|
||||||
settings = {
|
mountpoint = "/";
|
||||||
allowDiscards = true;
|
mountOptions = [ "compress=zstd" "noatime" "discard=async" "space_cache=v2" "ssd" ];
|
||||||
# keyFile = "/tmp/secret.key";
|
};
|
||||||
};
|
"@home" = {
|
||||||
# additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
mountpoint = "/home";
|
||||||
content = {
|
mountOptions = [ "compress=zstd" "noatime" "discard=async" "space_cache=v2" "ssd" ];
|
||||||
type = "btrfs";
|
};
|
||||||
extraArgs = [ "-f" ];
|
"@snapshots" = {
|
||||||
subvolumes = {
|
mountpoint = "/.snapshots";
|
||||||
"@" = {
|
mountOptions = [ "compress=zstd" "noatime" "discard=async" "space_cache=v2" "ssd" ];
|
||||||
mountpoint = "/";
|
};
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
"@nix" = {
|
||||||
};
|
mountpoint = "/nix";
|
||||||
"@home" = {
|
mountOptions = [ "compress=zstd" "noatime" "discard=async" "space_cache=v2" "ssd" ];
|
||||||
mountpoint = "/home";
|
};
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
"@swap" = {
|
||||||
};
|
mountpoint = "/swap";
|
||||||
"@snapshots" = {
|
swap.swapfile.size = swapfileSize;
|
||||||
mountpoint = "/.snapshots";
|
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
"@nix" = {
|
|
||||||
mountpoint = "/nix";
|
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
"@swap" = {
|
|
||||||
mountpoint = "/swap";
|
|
||||||
swap.swapfile.size = swapfileSize;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user