summaryrefslogtreecommitdiff
path: root/common/disks.nix
diff options
context:
space:
mode:
authortoufic ar <contact@toufy.me>2026-04-22 14:08:19 +0300
committertoufic ar <contact@toufy.me>2026-04-22 14:08:19 +0300
commitc7349e466fef7ecff5a46b1d0c819975a6bdcb8c (patch)
tree2a3fc53016ae4d0b31d7583171bd4b8e60f4cc17 /common/disks.nix
downloadservers-c7349e466fef7ecff5a46b1d0c819975a6bdcb8c.tar.gz
servers-c7349e466fef7ecff5a46b1d0c819975a6bdcb8c.zip
initial commit
Diffstat (limited to 'common/disks.nix')
-rw-r--r--common/disks.nix60
1 files changed, 60 insertions, 0 deletions
diff --git a/common/disks.nix b/common/disks.nix
new file mode 100644
index 0000000..6208bdc
--- /dev/null
+++ b/common/disks.nix
@@ -0,0 +1,60 @@
+{
+ disko.devices = {
+ disk = {
+ main = {
+ type = "disk";
+ device = "/dev/vda";
+ content = {
+ type = "gpt";
+ partitions = {
+ ESP = {
+ priority = 1;
+ name = "ESP";
+ start = "1M";
+ end = "1G";
+ type = "EF00";
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ mountOptions = ["fmask=0022" "dmask=0022"];
+ };
+ };
+ root = {
+ size = "100%";
+ content = {
+ type = "btrfs";
+ extraArgs = ["-f"];
+ subvolumes = {
+ "/root" = {
+ mountOptions = ["compress=zstd"];
+ mountpoint = "/";
+ };
+ "/home" = {
+ mountOptions = ["compress=zstd"];
+ mountpoint = "/home";
+ };
+ "/nix" = {
+ mountOptions = [
+ "compress=zstd"
+ "noatime"
+ ];
+ mountpoint = "/nix";
+ };
+ "/swap" = {
+ mountpoint = "/swap";
+ mountOptions = ["noatime"];
+ swap.swapfile = {
+ size = "8G";
+ path = "swapfile";
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+}