about summary refs log tree commit diff stats
path: root/modules/by-name/di/disks
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name/di/disks')
-rw-r--r--modules/by-name/di/disks/module.nix18
1 files changed, 16 insertions, 2 deletions
diff --git a/modules/by-name/di/disks/module.nix b/modules/by-name/di/disks/module.nix
index 7d5cb9bf..d5746ecf 100644
--- a/modules/by-name/di/disks/module.nix
+++ b/modules/by-name/di/disks/module.nix
@@ -11,6 +11,7 @@
   config,
   lib,
   pkgs,
+  modules,
   ...
 }: let
   # FIXME: The iso redeploy requires a bigger efi partition  <2024-05-12>
@@ -46,6 +47,10 @@ in {
     };
   };
 
+  imports = [
+    modules.disko.nixosModules.default
+  ];
+
   config = lib.mkIf cfg.enable {
     systemd = lib.recursiveUpdate (import ./hibernate.nix {inherit pkgs;}) (import ./fstrim.nix {inherit pkgs lib cfg;});
 
@@ -104,11 +109,20 @@ in {
       nodev = {
         "/" = {
           fsType = "tmpfs";
-          mountOptions = ["defaults" "size=4G" "mode=755"];
+          mountOptions = ["defaults" "size=25%" "mode=0755"];
         };
         "/tmp" = {
           fsType = "tmpfs";
-          mountOptions = ["defaults" "size=16G" "mode=755"];
+          mountOptions = ["defaults" "size=50%" "mode=0755"];
+        };
+        "/nix/var/nix/builds" = {
+          fsType = "tmpfs";
+          mountOptions = [
+            "defaults"
+            "noswap" # Otherwise, we might run into io-based slowdowns
+            "size=75%"
+            "mode=0755"
+          ];
         };
       };
     };