summary refs log tree commit diff stats
path: root/hardware-configuration.nix
diff options
context:
space:
mode:
authorsils <sils@sils.li>2023-01-14 16:05:45 +0100
committersils <sils@sils.li>2023-01-14 16:11:57 +0100
commitb32d3daea842e32ff44240c0f9fcc8778d1348d6 (patch)
treedca846c3a448638c1c86f61b4e149f78ef6cb901 /hardware-configuration.nix
parentFeat: Separate nix from root (diff)
downloadnixos-server-b32d3daea842e32ff44240c0f9fcc8778d1348d6.tar.gz
nixos-server-b32d3daea842e32ff44240c0f9fcc8778d1348d6.zip
Feat: Switch to inpersistent temproot.
Having persistence as opt-in has several advantages,
for instance better reproduceability.
Diffstat (limited to 'hardware-configuration.nix')
-rw-r--r--hardware-configuration.nix15
1 files changed, 12 insertions, 3 deletions
diff --git a/hardware-configuration.nix b/hardware-configuration.nix
index 8495607..d54f90a 100644
--- a/hardware-configuration.nix
+++ b/hardware-configuration.nix
@@ -5,14 +5,23 @@
   boot.initrd.kernelModules = ["nvme" "btrfs"];
   fileSystems = {
     "/" = {
+      device = "tmpfs";
+      fsType = "tmpfs";
+      options = ["defaults" "size=2G" "mode=755"];
+    };
+    "/nix" = {
       device = "/dev/vda3";
       fsType = "btrfs";
-      options = ["subvol=nixos-root"];
+      options = ["subvol=nix" "compress-force=zstd"];
     };
-    "/nix" = {
+    "/srv" = {
       device = "/dev/vda3";
       fsType = "btrfs";
-      options = ["subvol=nix"];
+      options = ["subvol=storage" "compress-force=zstd"];
+    };
+    "/etc/nixos" = {
+      device = "/srv/nix-config";
+      options = ["bind"];
     };
   };
 }