adicionado patchs recomendado para otimizaçao
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
programs.fish.shellAliases = {
|
||||
# upd = "sudo nix flake update --flake /etc/nixos && sudo nixos-rebuild switch --flake path:/etc/nixos#Alfa";
|
||||
upd = "nh home switch -a -u && nh os switch -a -u";
|
||||
upd = "nh home switch -a -u && nh os switch -a";
|
||||
updhome = "nh home switch -a -u";
|
||||
updsystem = "nh os switch -a -u";
|
||||
gitupdate = "git add . && git commit && git push origin main"
|
||||
gitupdate = "git add . && git commit && git push origin main";
|
||||
};
|
||||
}
|
||||
@@ -14,5 +14,6 @@
|
||||
./fish.nix
|
||||
./kernel.nix
|
||||
./udev.nix
|
||||
./patchgames.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
{ config, lib, inputs, pkgs, ... }: {
|
||||
|
||||
boot = {
|
||||
modprobeConfig.enable = true;
|
||||
kernelModules = [ "tcp_bbr" ];
|
||||
extraModprobeConfig =
|
||||
"options nvidia NVreg_UsePageAttributeTable=1 \
|
||||
NVreg_InitializeSystemMemoryAllocations=0 \
|
||||
NVreg_DynamicPowerManagement=0x02";
|
||||
kernel.sysctl = {
|
||||
"kernel.split_lock_mitigate" = 0;
|
||||
"kernel.nmi_watchdog" = 0;
|
||||
"net.core.netdev_max_backlog" = 4096;
|
||||
"fs.file-max" = 2097152;
|
||||
"net.ipv4.tcp_congestion_control" = "bbr";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
services = {
|
||||
|
||||
ananicy = {
|
||||
enable = true;
|
||||
package = pkgs.ananicy-cpp;
|
||||
rulesProvider = pkgs.ananicy-rules-cachyos;
|
||||
};
|
||||
|
||||
preload.enable = true;
|
||||
|
||||
earlyoom = {
|
||||
enable = true;
|
||||
freeSwapThreshold = 2;
|
||||
freeMemThreshold = 2;
|
||||
extraArgs = [
|
||||
"-g" "--avoid" "'^(X|plasma.*|konsole|kwin|wayland|gnome.*)$'"
|
||||
];
|
||||
};
|
||||
|
||||
udev = {
|
||||
enable = true;
|
||||
extraRules = ''
|
||||
# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
|
||||
ACTION=="add|bind", SUBSYSTEM=="pci", DRIVERS=="nvidia", \
|
||||
ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", \
|
||||
TEST=="power/control", ATTR{power/control}="auto"
|
||||
|
||||
# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind
|
||||
ACTION=="remove|unbind", SUBSYSTEM=="pci", DRIVERS=="nvidia", \
|
||||
ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", \
|
||||
TEST=="power/control", ATTR{power/control}="on"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
@@ -14,6 +14,4 @@
|
||||
algorithm = "zstd";
|
||||
};
|
||||
|
||||
## preload
|
||||
services.preload.enable = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user