Skip to content

Commit

Permalink
feat: add disko
Browse files Browse the repository at this point in the history
  • Loading branch information
sioodmy committed Jun 12, 2024
1 parent ecced1c commit dbee38d
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions hosts/calypso/disko.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
disko.devices = {
disk = {
nvme0n1 = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
# disable settings.keyFile if you want to use interactive password entry
#passwordFile = "/tmp/secret.key"; # Interactive
settings = {
allowDiscards = true;
};
content = {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
"/@persist" = {
mountpoint = "/persist";
mountOptions = ["compress=zstd" "noatime"];
};
"/@nix" = {
mountpoint = "/nix";
mountOptions = ["compress=zstd" "noatime"];
};
"/@swap" = {
mountpoint = "/.swapvol";
swap.swapfile.size = "20M";
};
};
};
};
};
};
};
};
};
};
}

0 comments on commit dbee38d

Please sign in to comment.