diff options
author | Preston Pan <preston@nullring.xyz> | 2024-03-07 00:29:13 -0800 |
---|---|---|
committer | Preston Pan <preston@nullring.xyz> | 2024-03-07 00:29:13 -0800 |
commit | 53e1f570b2cd2df3f2c7994af93e09078267c77d (patch) | |
tree | 5f07041f20f0fee33d9c071edb3ef885d2b2f74e /disk-config.nix | |
parent | a08061e975344f21805d115e01929566a36c8d05 (diff) |
disk-config
Diffstat (limited to 'disk-config.nix')
-rw-r--r-- | disk-config.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/disk-config.nix b/disk-config.nix new file mode 100644 index 0000000..c7a6dc4 --- /dev/null +++ b/disk-config.nix @@ -0,0 +1,63 @@ +{ + disko.devices = { + disk = { + vdb = { + type = "disk"; + device = "/dev/sda"; + 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; + #keyFile = "/tmp/secret.key"; + }; + #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 = "20M"; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +} |