pumpkin: adb: enable
[julm/julm-nix.git] / hosts / oignon / hardware.nix
index f7a58677c85a3ab5267e4a6c6d70e5d9acaf369a..ab3cad22fa8ef73d1321439bf29b950d704c3c63 100644 (file)
@@ -24,7 +24,7 @@
   */
   boot.loader.grub = {
     enable = true;
-    version = 2;
+    memtest86.enable = true;
     devices = [
       "/dev/disk/by-id/ata-Samsung_SSD_850_PRO_128GB_S1SMNSAFC36436X"
     ];
     #efiSupport = true;
     #enableCryptodisk = true;
   };
+  boot.zfs.requestEncryptionCredentials = [ hostName ];
+
+  hardware.enableRedistributableFirmware = true;
 
   # Note that gobi_loader -2000 has to be rerun if the SIM is hot swapped
   services.udev.extraRules = ''
-    ACTION=="add", SUBSYSTEM=="tty", KERNEL=="ttyUSB*", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9204", RUN+="${pkgs.gobi_loader}/lib/udev/gobi_loader -2000 $env{DEVNAME} /home/julm/documents/thinkpad-x201/gobi"
+    ACTION=="add", SUBSYSTEM=="tty", KERNEL=="ttyUSB*", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9204", RUN+="${pkgs.gobi_loader}/lib/udev/gobi_loader -2000 $env{DEVNAME} /home/julm/files/thinkpad-x201/gobi"
   '';
 
-  fileSystems."/boot" =
-    {
-      device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
-      fsType = "ext2";
-    };
-  fileSystems."/boot/efi" =
-    {
-      device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
-      fsType = "vfat";
-    };
+  fileSystems."/boot" = {
+    device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
+    fsType = "ext2";
+  };
+  fileSystems."/boot/efi" = {
+    device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
+    fsType = "vfat";
+  };
   swapDevices = [
     {
       device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
     }
   ];
 
-  boot.supportedFilesystems = [ "ntfs" "vfat" ];
+  boot.supportedFilesystems = [
+    "ntfs"
+    "vfat"
+  ];
 
-  fileSystems."/" =
-    {
-      device = "${hostName}/root";
-      fsType = "zfs";
-    };
-  fileSystems."/nix" =
-    {
-      device = "${hostName}/nix";
-      fsType = "zfs";
-    };
-  fileSystems."/var" =
-    {
-      device = "${hostName}/var";
-      fsType = "zfs";
-    };
+  fileSystems."/" = {
+    device = "${hostName}/root";
+    fsType = "zfs";
+  };
+  fileSystems."/nix" = {
+    device = "${hostName}/nix";
+    fsType = "zfs";
+  };
+  fileSystems."/var" = {
+    device = "${hostName}/var";
+    fsType = "zfs";
+  };
 
   services.pipewire.jack.enable = true;
 
+  services.acpid = {
+    # Suspending not work well on this old computer.
+    lidEventCommands = "";
+  };
+
 }