mirror of
https://github.com/librephoenix/nixos-config
synced 2025-01-19 07:05:51 +05:30
Testing some kernel and systemd config changes
This commit is contained in:
parent
c82069045e
commit
0b2241d439
|
@ -6,6 +6,7 @@
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ ../../system/hardware-configuration.nix
|
[ ../../system/hardware-configuration.nix
|
||||||
|
../../system/hardware/systemd.nix # systemd config
|
||||||
../../system/hardware/kernel.nix # Kernel config
|
../../system/hardware/kernel.nix # Kernel config
|
||||||
../../system/hardware/power.nix # Power management
|
../../system/hardware/power.nix # Power management
|
||||||
../../system/hardware/opengl.nix
|
../../system/hardware/opengl.nix
|
||||||
|
|
|
@ -10,10 +10,9 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ #"${modulesPath}/profiles/minimal.nix"
|
[ nixos-wsl.nixosModules.wsl
|
||||||
nixos-wsl.nixosModules.wsl
|
|
||||||
#../../system/hardware-configuration.nix
|
|
||||||
../../system/hardware/kernel.nix # Kernel config
|
../../system/hardware/kernel.nix # Kernel config
|
||||||
|
../../system/hardware/systemd.nix # systemd config
|
||||||
../../system/hardware/opengl.nix
|
../../system/hardware/opengl.nix
|
||||||
../../system/hardware/printing.nix
|
../../system/hardware/printing.nix
|
||||||
../../system/hardware/bluetooth.nix
|
../../system/hardware/bluetooth.nix
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
environment.systemPackages = [ pkgs.virt-manager ];
|
environment.systemPackages = with pkgs; [ virt-manager virtualbox ];
|
||||||
virtualisation.libvirtd = {
|
virtualisation.libvirtd = {
|
||||||
allowedBridges = [
|
allowedBridges = [
|
||||||
"nm-bridge"
|
"nm-bridge"
|
||||||
"virbr0"
|
"virbr0"
|
||||||
];
|
];
|
||||||
enable = true;
|
enable = true;
|
||||||
qemuRunAsRoot = false;
|
qemuRunAsRoot = false;
|
||||||
};
|
};
|
||||||
|
boot.extraModulePackages = with config.boot.kernelPackages; [ virtualbox ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||||
|
boot.extraModulePackages = with config.boot.kernelPackages; [
|
||||||
|
zenpower
|
||||||
|
amdgpu-pro
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
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_BAT = "power";
|
||||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
CPU_MIN_PERF_ON_AC = 0;
|
CPU_MIN_PERF_ON_AC = 0;
|
||||||
CPU_MAX_PERF_ON_AC = 100;
|
CPU_MAX_PERF_ON_AC = 100;
|
||||||
CPU_MIN_PERF_ON_BAT = 0;
|
CPU_MIN_PERF_ON_BAT = 0;
|
||||||
CPU_MAX_PERF_ON_BAT = 90;
|
CPU_MAX_PERF_ON_BAT = 80;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
7
system/hardware/systemd.nix
Normal file
7
system/hardware/systemd.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.journald.extraConfig = "SystemMaxUse=250M\nSystemMaxFiles=10";
|
||||||
|
services.journald.rateLimitBurst = 800;
|
||||||
|
services.journald.rateLimitInterval = "5s";
|
||||||
|
}
|
Loading…
Reference in a new issue