about summary refs log tree commit diff
path: root/machines/aszlig
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2022-04-01 05:06:14 +0200
committeraszlig <aszlig@nix.build>2022-04-01 16:31:17 +0200
commite04c7e04f2fe63cece7a2f2064212bc055cdd035 (patch)
treee3ccc7bbf21807a893eefd48356178e880e4c844 /machines/aszlig
parent1eb9ad504647f127a337f280a5d07657e1b83457 (diff)
machines/tishtushi: Switch to new SSD
Previously, the machine had an internal SSD with a size of around 20 GB,
which until it died in 2018[1] was used as the /nix/store.

With dnyarri getting a hardware upgrade[2], the SSD that was used back
then as a bcache became obsolete.

Given that the spinning rust inside Tishtushi is slow as hell and also
way smaller (320 GB) than the former bcache SSD (512 GB), I decided to
just replace the spinning rust with the SSD, which should at least make
I/O operations bearable while falling asleep on CPU-bound operations.

Since the NixOS LUKS setup now also propagates passphrases to other
devices, we also no longer need the vault device because the reason it
existed was to avoid being prompted multiple times for the passphrase.

[1]: 54c99271f7570c32a4215a097e577272cd4210b2
[2]: be0fb40a12b5a9301509ad45fda1eda11971fa8e

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'machines/aszlig')
-rw-r--r--machines/aszlig/tishtushi.nix29
1 files changed, 9 insertions, 20 deletions
diff --git a/machines/aszlig/tishtushi.nix b/machines/aszlig/tishtushi.nix
index ff37927d..8a7977b1 100644
--- a/machines/aszlig/tishtushi.nix
+++ b/machines/aszlig/tishtushi.nix
@@ -3,33 +3,22 @@
 {
   vuizvui.user.aszlig.profiles.workstation.enable = true;
 
-  vuizvui.system.kernel.bfq.enable = true;
-
   boot.kernelPackages = pkgs.linuxPackages_latest;
 
   boot.loader = {
     grub.enable = true;
-    grub.device = "/dev/disk/by-id/ata-Hitachi_HTS543232A7A384_E2P31243FGB6PJ";
+    grub.device =
+      "/dev/disk/by-id/ata-Samsung_SSD_860_EVO_500GB_S3Z2NB0KA77896M";
     timeout = 1;
   };
 
-  boot.initrd = {
-    luks.devices = {
-      "00vault" = {
-        device = "/dev/disk/by-uuid/812f19f1-9096-4367-b2e4-0c9537c52a67";
-      };
-      tishtushi-swap = {
-        device = "/dev/disk/by-uuid/2934df87-5fda-4b2e-9f3b-c4c96f571407";
-        keyFile = "/dev/mapper/00vault";
-      };
-      tishtushi-root = {
-        device = "/dev/disk/by-uuid/cf65f144-9205-40a5-a239-b660695a6740";
-        keyFile = "/dev/mapper/00vault";
-      };
+  boot.initrd.luks.devices = {
+    tishtushi-swap = {
+      device = "/dev/disk/by-uuid/db144d14-9268-4f12-a421-e9c41fc207a3";
+    };
+    tishtushi-root = {
+      device = "/dev/disk/by-uuid/e8eafbdd-6056-41c7-88bc-51bfb8a98e22";
     };
-    postDeviceCommands = lib.mkAfter ''
-      cryptsetup luksClose /dev/mapper/00vault
-    '';
   };
 
   hardware.cpu.intel.updateMicrocode = true;
@@ -46,7 +35,7 @@
   fileSystems."/" = {
     device = "/dev/mapper/tishtushi-root";
     fsType = "btrfs";
-    options = [ "space_cache" "compress=zstd" "noatime" ];
+    options = [ "space_cache=v2" "compress=zstd" "noatime" "discard=async" ];
   };
 
   swapDevices = lib.singleton {