Commit da4a71b1c1ab

Vincent Demeester <vincent@sbr.pm>
2022-08-19 11:01:37
systems: updates for wakasu
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent a8be6fa
Changed files (4)
systems/hardware/thinkpad-x1g9.nix
@@ -3,4 +3,32 @@
   # imports = [
   #   ./thinkpad.nix
   # ];
+  boot = {
+    blacklistedKernelModules = [
+      "sierra_net" # sierra wireless modules
+      "cdc_mbim"   # modem mobile broadband modules
+      "cdc_ncm"    # similar
+    ];
+    extraModprobeConfig = ''
+      options snd_hda_intel power_save=1
+    '';
+    initrd = {
+      availableKernelModules = [
+        "nvme"             # required for nvme disks
+	"thunderbolt"      # required for thunderbolt (dock, ...)
+	"dm-mod" "cryptd"  # required for encryption
+	"ahci"             # sata controller, might not be needed
+	"xhci_pci"         # usb controller related
+	"usb_storage"      # usb storage related
+	"sd_mod"           # block device related
+	"sdhci_pci"        # block device related as well
+	"aesni-intel"      # advanced encryption for intel
+      ];
+    };
+    loader.efi.canTouchEfiVariables = true;
+  };
+  hardware = {
+    trackpoint.enable = false;
+    cpu.intel.updateMicrocode = true;
+  };
 }
systems/hosts/wakasu.nix
@@ -1,8 +1,3 @@
-# { sources ? import ../../nix
-# , lib ? sources.lib
-# , pkgs ? sources.pkgs { }
-# , ...
-# }:
 { config, lib, pkgs, ... }:
 
 with lib;
@@ -35,6 +30,7 @@ in
   boot.initrd.luks.devices = {
     root = {
       device = "/dev/disk/by-uuid/c0cac87c-53ec-4262-9ab2-a3ee8331c75a";
+      #device = "/dev/nvme0n1p1";
       preLVM = true;
       allowDiscards = true;
       keyFile = "/dev/disk/by-id/usb-_USB_DISK_2.0_070D375D84327E87-0:0";
@@ -67,10 +63,6 @@ in
     };
   };
 
-  # FIXME Fix tmpOnTmpfs
-  systemd.additionalUpstreamSystemUnits = [ "tmp.mount" ];
-
-
   services.udev.extraRules = ''
     # STM32 rules for the Moonlander and Planck EZ
     SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", \
@@ -88,7 +80,8 @@ in
 
   modules = {
     hardware = {
-      #yubikey.enable = true;
+      yubikey.enable = true;
+      #laptop.enable = true;
     };
   };
 
systems/modules/core/boot.nix
@@ -0,0 +1,5 @@
+{ config, pkgs }:
+
+{
+
+}
\ No newline at end of file
systems/modules/core/default.nix
@@ -1,5 +1,6 @@
 {
   imports = [
+    #./boot.nix
     ./config.nix
     ./nix.nix
     ./users.nix
@@ -8,4 +9,6 @@
   boot = {
     cleanTmpDir = true;
   };
+  # FIXME fix tmpOnTmpfs
+  systemd.additionalUpstreamSystemUnits = [ "tmp.mount" ];
 }