From da3cefab0d3a80cc5b426f1c81b45ce54296e127 Mon Sep 17 00:00:00 2001 From: Paul-Henri Froidmont Date: Tue, 9 Sep 2025 01:40:56 +0200 Subject: [PATCH] Tweak performance settings --- common.nix | 4 ++++ hosts/froidmpa-laptop/hardware-configuration.nix | 2 -- hosts/nixos-desktop/hardware-configuration.nix | 8 +++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/common.nix b/common.nix index d4762da..ca3ece8 100644 --- a/common.nix +++ b/common.nix @@ -43,6 +43,10 @@ i18n.defaultLocale = lib.mkDefault "en_US.UTF-8"; + zramSwap.enable = true; + zramSwap.memoryPercent = 300; + systemd.oomd.enable = true; + console = { keyMap = lib.mkDefault "fr"; font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz"; diff --git a/hosts/froidmpa-laptop/hardware-configuration.nix b/hosts/froidmpa-laptop/hardware-configuration.nix index 3909a85..c895068 100644 --- a/hosts/froidmpa-laptop/hardware-configuration.nix +++ b/hosts/froidmpa-laptop/hardware-configuration.nix @@ -39,8 +39,6 @@ swapDevices = [ { device = "/dev/disk/by-uuid/bb8fa9ef-9b8f-413d-913a-6c891649a954"; } ]; - zramSwap.enable = true; - hardware = { bluetooth = { enable = true; diff --git a/hosts/nixos-desktop/hardware-configuration.nix b/hosts/nixos-desktop/hardware-configuration.nix index 0d304fe..d7f7432 100644 --- a/hosts/nixos-desktop/hardware-configuration.nix +++ b/hosts/nixos-desktop/hardware-configuration.nix @@ -1,5 +1,4 @@ { - config, lib, pkgs, modulesPath, @@ -49,7 +48,10 @@ swapDevices = [ { device = "/dev/disk/by-uuid/f714775c-b5af-4c0c-8330-999b43db4794"; } ]; - zramSwap.enable = true; + powerManagement = { + cpuFreqGovernor = "performance"; + powertop.enable = true; + }; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; @@ -66,7 +68,7 @@ ]; }; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = true; services.resolved.dnssec = "false"; }