From 0051f45c22ba961ea7f71e57363af9c2f8f10588 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Tue, 16 Jul 2024 12:35:16 +0200 Subject: [PATCH] Enable fstrim --- hosts/inspiron/hardware.nix | 7 ++++--- hosts/north/hardware.nix | 15 ++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/hosts/inspiron/hardware.nix b/hosts/inspiron/hardware.nix index 1f35463..f05a1ac 100644 --- a/hosts/inspiron/hardware.nix +++ b/hosts/inspiron/hardware.nix @@ -12,7 +12,10 @@ swapDevices = [ { device = "/dev/disk/by-uuid/1eba93d1-4853-4534-8cfd-5c14e29c6ff6"; } ]; + nixpkgs.hostPlatform = "x86_64-linux"; hardware.enableRedistributableFirmware = true; + hardware.cpu.amd.updateMicrocode = true; + boot.kernelModules = [ "kvm-amd" ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" @@ -20,9 +23,7 @@ "usb_storage" "sd_mod" ]; - boot.kernelModules = [ "kvm-amd" ]; - nixpkgs.hostPlatform = "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = true; zramSwap.enable = true; + services.fstrim.enable = true; } diff --git a/hosts/north/hardware.nix b/hosts/north/hardware.nix index 0ff03b4..b57e173 100644 --- a/hosts/north/hardware.nix +++ b/hosts/north/hardware.nix @@ -11,7 +11,14 @@ ./disko.nix ]; + nixpkgs.hostPlatform = "x86_64-linux"; hardware.enableRedistributableFirmware = true; + hardware.cpu.amd.updateMicrocode = true; + boot.kernelModules = [ + "kvm-amd" + "k10temp" + "nct6775" + ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" @@ -20,15 +27,9 @@ "usbhid" "sd_mod" ]; - boot.kernelModules = [ - "kvm-amd" - "k10temp" - "nct6775" - ]; - nixpkgs.hostPlatform = "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = true; zramSwap.enable = true; + services.fstrim.enable = true; services.xserver.videoDrivers = [ "nvidia" ]; hardware.nvidia = {