about summary refs log tree commit diff
path: root/machines/aszlig
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2021-06-15 23:05:41 +0200
committeraszlig <aszlig@nix.build>2021-06-15 23:05:41 +0200
commitbe0fb40a12b5a9301509ad45fda1eda11971fa8e (patch)
tree4dd2030b9041fd9e7a24f3995a5545e37b2024a5 /machines/aszlig
parent4701a995cb865c5d7178f574a3eae5872595e768 (diff)
dnyarri: Switch machine config to new hardware
The first (small) part of this already started in commit
dc2ef245d76f900f174e87961a3d17e6aecbd6e2, where I switched from Intel
CPU microcode to AMD.

However, at that time the hardware was still on its way, so the actual
move didn't happen yet.

On June 4th 2021 at 17:22:41 CEST, I started to migrate to the new
machine by using my old spinning rust configuration and btrfs balanced
to NVMe-only.

This means that we now no longer need to use bcache, which was a 512 GB
SATA SSD, nor do we use a RAID10 configuration in btrfs. Instead, I've
switched to NVMe with RAID1 exclusively, so this removes BFQ, power
management workarounds and two devices.

Since my old graphics card didn't work with UEFI GOP, I also had to
switch to a newer one (which I wanted to avoid, but whatever...), so
instead of DVI and HDMI we're now exclusively on DisplayPort.

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'machines/aszlig')
-rw-r--r--machines/aszlig/dnyarri.nix60
1 files changed, 10 insertions, 50 deletions
diff --git a/machines/aszlig/dnyarri.nix b/machines/aszlig/dnyarri.nix
index 0de6f6a6..2e260507 100644
--- a/machines/aszlig/dnyarri.nix
+++ b/machines/aszlig/dnyarri.nix
@@ -8,39 +8,19 @@ let
 
   cryptDevices = {
     root = lib.imap (mkDevice "root") [
-      "b13d257e-b5fd-4f86-82b1-8bfe06335a75"
-      "a607c827-2fd7-49d9-a7d8-05279c8653a4"
-      "de32cb42-2e09-4e6a-84b4-244078d289c8"
-      "12dac5b2-7647-45de-b752-5efee23855d0"
+      "36260b1f-b403-477f-ab0e-505061c4e9d8"
+      "3d5d71fa-ca2a-4144-a656-c68378cd2128"
     ];
     swap = lib.imap (mkDevice "swap") [
-      "e0a8281d-2c68-48ca-8e00-f0defaf51f38"
-      "d26e61d6-c238-4c01-8c57-b1ba0bdb8c93"
+      "537b8b6b-0f03-4b2a-b0bb-6ebf18f7d9a0"
+      "82d5a52d-1661-474d-859d-85c7d400d4b5"
     ];
   };
 
-  bcacheMode = "writethrough";
-
-  bcacheStart = ''
-    for i in /sys/block/bcache[0-9]*/bcache/cache_mode; do
-      echo ${lib.escapeShellArg bcacheMode} > "$i"
-    done
-  '';
-
-  bcacheStop = ''
-    for i in /sys/block/bcache[0-9]*/bcache/cache_mode; do
-      echo none > "$i"
-    done
-  '';
-
 in {
   vuizvui.user.aszlig.profiles.workstation.enable = true;
 
-  vuizvui.requiresTests = [
-    ["vuizvui" "aszlig" "dnyarri" "luks2-bcache"]
-  ];
-
-  nix.maxJobs = 8;
+  nix.maxJobs = 24;
 
   boot = {
     loader.systemd-boot.enable = true;
@@ -50,7 +30,7 @@ in {
     kernelPackages = pkgs.linuxPackages_latest;
 
     initrd = {
-      availableKernelModules = [ "bcache" ];
+      availableKernelModules = [ "xhci_pci" "ahci" "nvme" ];
       luks.devices =
         lib.listToAttrs (lib.concatLists (lib.attrValues cryptDevices));
     };
@@ -79,15 +59,14 @@ in {
   hardware.sane.enable = true;
   hardware.sane.extraBackends = [ pkgs.hplip ];
 
-  vuizvui.system.kernel.bfq.enable = true;
   hardware.enableRedistributableFirmware = true;
 
   networking.hostName = "dnyarri";
-  networking.interfaces.eno0.useDHCP = true;
+  networking.interfaces.enp1s0.useDHCP = true;
 
   fileSystems = {
     "/boot" = {
-      device = "/dev/disk/by-uuid/9A75-9A6E";
+      device = "/dev/disk/by-uuid/8C65-450D";
       fsType = "vfat";
     };
     "/" = {
@@ -97,27 +76,8 @@ in {
     };
   };
 
-  powerManagement.powerUpCommands = ''
-    ${pkgs.hdparm}/sbin/hdparm -B 255 /dev/disk/by-id/ata-ST31500541AS_5XW0AMNH
-    ${pkgs.hdparm}/sbin/hdparm -B 255 /dev/disk/by-id/ata-ST31500541AS_6XW0M217
-    ${bcacheStart}
-  '';
-
-  powerManagement.powerDownCommands = bcacheStop;
-
   services.btrfs.autoScrub.enable = true;
 
-  # Inject preStart/postStart for activating/deactivating bcache to the scrub
-  # services, so we don't get large amounts of nonsense on the caching device.
-  systemd.services = let
-    scrubServiceUnits = let
-      mkName = fs: "btrfs-scrub-${utils.escapeSystemdPath fs}";
-    in map mkName config.services.btrfs.autoScrub.fileSystems;
-  in lib.genAttrs scrubServiceUnits (lib.const {
-    preStart = bcacheStop;
-    postStart = bcacheStart;
-  });
-
   swapDevices = map ({ name, ... }: {
     device = "/dev/mapper/${name}";
   }) cryptDevices.swap;
@@ -130,8 +90,8 @@ in {
     "audio"
   ];
 
-  services.xserver.videoDrivers = [ "ati" ];
-  services.xserver.xrandrHeads = [ "DVI-0" "HDMI-0" ];
+  services.xserver.videoDrivers = [ "amdgpu" ];
+  services.xserver.xrandrHeads = [ "DisplayPort-0" "DisplayPort-1" ];
   services.xserver.wacom.enable = true;
 
   vuizvui.user.aszlig.services.i3.workspaces."1" = {