sourcephile.fr: nebula: open HTTP output
[julm/julm-nix.git] / hosts / blackberry / hardware.nix
index 2abef939c6a36c208a88f8ab3515aa4b64a4e723..c74bf29aaa7ded9b26321bbea568e3dd492b1994 100644 (file)
@@ -6,6 +6,11 @@
     ../../nixos/profiles/zramSwap.nix
   ];
 
+  boot.kernelParams = [
+    # Avoids huge slow downs, especially with nix.
+    "zfs.zfs_arc_max=${toString (1024 * 1024 * 1024)}" # bytes
+  ];
+
   # Setting the machine-id avoids to reencrypt all credentials
   # when reinstalling NixOS on a new drive.
   # Manually generated with : uuidgen | tr -d -
       enable = true;
       memtest86.enable = true;
       mirroredBoots = [
-        { path = "/boot1"; devices = [ "/dev/disk/by-id/ata-CT250MX500SSD1_2004E2849DD5" ]; }
+        {
+          path = "/boot1";
+          devices = [ "/dev/disk/by-id/ata-CT250MX500SSD1_2004E2849DD5" ];
+        }
       ];
       # Roughly 25MiB (initrd) + 9MiB (kernel) per configuration
       configurationLimit = 6;
 
   hardware.enableRedistributableFirmware = true;
 
-  fileSystems."/boot1" =
-    {
-      device = "/dev/disk/by-partlabel/${hostName}_ssd1_boot";
-      fsType = "vfat";
-      options = [ "rw" "noexec" "nodev" "nofail" "X-mount.mkdir" "iocharset=iso8859-1" ];
-    };
+  fileSystems."/boot1" = {
+    device = "/dev/disk/by-partlabel/${hostName}_ssd1_boot";
+    fsType = "vfat";
+    options = [
+      "rw"
+      "noexec"
+      "nodev"
+      "nofail"
+      "X-mount.mkdir"
+      "iocharset=iso8859-1"
+    ];
+  };
   swapDevices = [
     {
       device = "/dev/disk/by-partlabel/${hostName}_ssd1_swap";
     }
   ];
 
-  boot.supportedFilesystems = [ "ntfs" "vfat" ];
+  boot.supportedFilesystems = [
+    "ntfs"
+    "vfat"
+  ];
 
-  fileSystems."/" =
-    {
-      device = "${hostName}/root";
-      fsType = "zfs";
-      options = [ "zfsutil" ];
-    };
-  fileSystems."/nix" =
-    {
-      device = "${hostName}/root/nix";
-      fsType = "zfs";
-      options = [ "X-mount.mkdir" "zfsutil" ];
-    };
-  fileSystems."/var" =
-    {
-      device = "${hostName}/root/var";
-      fsType = "zfs";
-      options = [ "X-mount.mkdir" "zfsutil" ];
-    };
+  fileSystems."/" = {
+    device = "${hostName}/root";
+    fsType = "zfs";
+    options = [ "zfsutil" ];
+  };
+  fileSystems."/nix" = {
+    device = "${hostName}/root/nix";
+    fsType = "zfs";
+    options = [
+      "X-mount.mkdir"
+      "zfsutil"
+    ];
+  };
+  fileSystems."/var" = {
+    device = "${hostName}/root/var";
+    fsType = "zfs";
+    options = [
+      "X-mount.mkdir"
+      "zfsutil"
+    ];
+  };
 
   services.pipewire.jack.enable = true;
-
 }