From 1d44d3881b8addd9164d546694c4a1d8783bec71 Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Fri, 11 Oct 2024 18:23:06 +0200 Subject: [PATCH] hermit/filesystem: init --- hosts/hermit/filesystem/default.nix | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 hosts/hermit/filesystem/default.nix diff --git a/hosts/hermit/filesystem/default.nix b/hosts/hermit/filesystem/default.nix new file mode 100644 index 0000000..bad8be3 --- /dev/null +++ b/hosts/hermit/filesystem/default.nix @@ -0,0 +1,45 @@ +{ + config = { + boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/96e8f3d6-8d2d-4e2d-abd9-3eb7f48fed02"; + fileSystems = { + "/boot" = { + device = "/dev/disk/by-uuid/7825-451F"; + fsType = "vfat"; + }; + # root on tmpfs + "/" = { + device = "none"; + fsType = "tmpfs"; + options = ["defaults" "size=25%" "mode=755"]; + }; + "/nix" = { + device = "/dev/disk/by-uuid/f0569993-722e-4721-b0d9-8ac537a7a548"; + fsType = "btrfs"; + options = ["subvol=nix" "compress=zstd" "noatime"]; + }; + "/persist" = { + device = "/dev/disk/by-uuid/f0569993-722e-4721-b0d9-8ac537a7a548"; + neededForBoot = true; + fsType = "btrfs"; + options = ["subvol=persist" "compress=zstd" "noatime"]; + }; + "/home" = { + device = "/dev/disk/by-uuid/f0569993-722e-4721-b0d9-8ac537a7a548"; + fsType = "btrfs"; + options = ["subvol=home" "compress=zstd" "noatime"]; + }; + "/swap" = { + device = "/dev/disk/by-uuid/f0569993-722e-4721-b0d9-8ac537a7a548"; + fsType = "btrfs"; + + options = ["subvol=swap" "compress=lzo" "noatime"]; + }; + }; + swapDevices = [ + { + device = "/swap/swapfile"; + size = (1024 * 16) + (1024 * 2); + } + ]; + }; +}