diff --git a/profiles/work/configuration.nix b/profiles/work/configuration.nix index 68fce9b..8c80d80 100644 --- a/profiles/work/configuration.nix +++ b/profiles/work/configuration.nix @@ -6,6 +6,7 @@ { imports = [ ../../system/hardware-configuration.nix + ../../system/hardware/systemd.nix # systemd config ../../system/hardware/kernel.nix # Kernel config ../../system/hardware/power.nix # Power management ../../system/hardware/opengl.nix diff --git a/profiles/wsl/configuration.nix b/profiles/wsl/configuration.nix index c4172d6..d4baaf0 100644 --- a/profiles/wsl/configuration.nix +++ b/profiles/wsl/configuration.nix @@ -10,10 +10,9 @@ let in { imports = - [ #"${modulesPath}/profiles/minimal.nix" - nixos-wsl.nixosModules.wsl - #../../system/hardware-configuration.nix + [ nixos-wsl.nixosModules.wsl ../../system/hardware/kernel.nix # Kernel config + ../../system/hardware/systemd.nix # systemd config ../../system/hardware/opengl.nix ../../system/hardware/printing.nix ../../system/hardware/bluetooth.nix diff --git a/system/app/virtualization.nix b/system/app/virtualization.nix index 6f56e09..87099d1 100644 --- a/system/app/virtualization.nix +++ b/system/app/virtualization.nix @@ -1,13 +1,14 @@ { config, lib, pkgs, ... }: { - environment.systemPackages = [ pkgs.virt-manager ]; + environment.systemPackages = with pkgs; [ virt-manager virtualbox ]; virtualisation.libvirtd = { - allowedBridges = [ - "nm-bridge" - "virbr0" - ]; - enable = true; - qemuRunAsRoot = false; + allowedBridges = [ + "nm-bridge" + "virbr0" + ]; + enable = true; + qemuRunAsRoot = false; }; + boot.extraModulePackages = with config.boot.kernelPackages; [ virtualbox ]; } diff --git a/system/hardware/kernel.nix b/system/hardware/kernel.nix index 6837fea..dbecd5b 100644 --- a/system/hardware/kernel.nix +++ b/system/hardware/kernel.nix @@ -1,5 +1,9 @@ { config, lib, pkgs, ... }: { - boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = pkgs.linuxPackages_zen; + boot.extraModulePackages = with config.boot.kernelPackages; [ + zenpower + amdgpu-pro + ]; } diff --git a/system/hardware/power.nix b/system/hardware/power.nix index a765936..cc59a4b 100644 --- a/system/hardware/power.nix +++ b/system/hardware/power.nix @@ -17,7 +17,7 @@ enable = true; settings = { CPU_SCALING_GOVERNOR_ON_AC = "performance"; - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + CPU_SCALING_GOVERNOR_ON_BAT = "schedutil"; CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; @@ -25,7 +25,7 @@ CPU_MIN_PERF_ON_AC = 0; CPU_MAX_PERF_ON_AC = 100; CPU_MIN_PERF_ON_BAT = 0; - CPU_MAX_PERF_ON_BAT = 90; + CPU_MAX_PERF_ON_BAT = 80; }; }; diff --git a/system/hardware/systemd.nix b/system/hardware/systemd.nix new file mode 100644 index 0000000..8670be6 --- /dev/null +++ b/system/hardware/systemd.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: + +{ + services.journald.extraConfig = "SystemMaxUse=250M\nSystemMaxFiles=10"; + services.journald.rateLimitBurst = 800; + services.journald.rateLimitInterval = "5s"; +}