From 638161b9c7b0ac2ca5836d0250b3002d6b28d953 Mon Sep 17 00:00:00 2001 From: Markus Schmidl Date: Thu, 15 Aug 2024 22:36:00 +0200 Subject: [PATCH] tetra-zw: update to new hardware --- flake.lock | 17 ++++++++++++ flake.nix | 5 ++++ hardware/tetra-zw.nix | 44 ++++++++++++++++++++++++-------- hosts/tetra-zw/configuration.nix | 3 --- 4 files changed, 56 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index 73aca98..2671746 100644 --- a/flake.lock +++ b/flake.lock @@ -528,6 +528,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1718207430, + "narHash": "sha256-/eO2NTRvrrdYWMI06plS8ANDGOhTZBA+C3H3KwbBI1w=", + "ref": "refs/heads/master", + "rev": "9e848e173ca83adf884815c66edc08652ef9ade8", + "revCount": 1712, + "type": "git", + "url": "https://github.com/NixOS/nixos-hardware.git" + }, + "original": { + "rev": "9e848e173ca83adf884815c66edc08652ef9ade8", + "type": "git", + "url": "https://github.com/NixOS/nixos-hardware.git" + } + }, "nixpkgs": { "locked": { "lastModified": 1684570954, @@ -750,6 +766,7 @@ "lizard": "lizard", "microvm": "microvm", "naersk": "naersk_4", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_6", "nixpkgs-2311": "nixpkgs-2311", "private-flake-overlays": "private-flake-overlays", diff --git a/flake.nix b/flake.nix index 091cb60..5ac30b0 100644 --- a/flake.nix +++ b/flake.nix @@ -34,6 +34,9 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + # nixos hardware for nixos 23.11 + nixos-hardware.url = "git+https://github.com/NixOS/nixos-hardware.git?rev=9e848e173ca83adf884815c66edc08652ef9ade8"; + ## TLMS stuff below trekkie = { url = "github:tlm-solutions/trekkie"; @@ -130,6 +133,7 @@ , telegram-decoder , trekkie , chemo + , nixos-hardware , ... }: let @@ -258,6 +262,7 @@ specialArgs = { inherit inputs self; registry = registry.tetra-zw; }; modules = [ sops-nix.nixosModules.sops + nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1 ./modules/TLMS ./hosts/tetra-zw diff --git a/hardware/tetra-zw.nix b/hardware/tetra-zw.nix index 3d5b25d..99c6bb2 100644 --- a/hardware/tetra-zw.nix +++ b/hardware/tetra-zw.nix @@ -8,7 +8,7 @@ ./disk-module ]; networking = { - interfaces.enp5s0.useDHCP = lib.mkDefault true; + interfaces.enp6s0.useDHCP = lib.mkDefault true; useDHCP = lib.mkDefault true; }; @@ -16,19 +16,36 @@ networking.wireguard.enable = true; deployment-TLMS.net.iface.uplink = { - name = lib.mkDefault "enp5s0"; + name = lib.mkDefault "enp6s0"; useDHCP = lib.mkDefault true; }; boot.tmp.tmpfsSize = "25%"; - boot.kernelModules = [ "kvm-intel" "r8168" ]; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" "sdhci_acpi" ]; - boot.initrd.kernelModules = [ ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "nvme" + "ehci_pci" + "ahci" + "uas" + "usb_storage" + "sd_mod" + "sr_mod" + "rtsx_pci_sdmmc" + "aesni_intel" + "cryptd" + "essiv" + "r8169" + ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.kernelParams = [ "btusb.enable_autosuspend=n" ]; boot.extraModulePackages = [ ]; - # some whoopsie in kernel 6.1.x maybe? - boot.kernelPackages = pkgs.linuxKernel.packages.linux_5_15; + boot.supportedFilesystems = [ ]; + + hardware.cpu.amd.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; + + boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_6; swapDevices = [ ]; fileSystems."/" = @@ -37,6 +54,13 @@ fsType = "ext4"; }; - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/sda"; + fileSystems."/boot" = + { + device = "/dev/disk/by-label/ESP"; + fsType = "vfat"; + }; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.systemd-boot.configurationLimit = 1; } diff --git a/hosts/tetra-zw/configuration.nix b/hosts/tetra-zw/configuration.nix index 095dbff..9e04dc8 100644 --- a/hosts/tetra-zw/configuration.nix +++ b/hosts/tetra-zw/configuration.nix @@ -30,7 +30,4 @@ powerManagement.enable = true; powerManagement.cpuFreqGovernor = "ondemand"; - # 2.8-3.0GHz - powerManagement.cpufreq.min = 2800000; - powerManagement.cpufreq.max = 3000000; }