cachyos kernel + zRAM + swap, for better perfs and less ooms
This commit is contained in:
parent
aebda3feba
commit
f52275d3e1
6 changed files with 32 additions and 2 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "nix-cachyos-kernel"]
|
||||||
|
path = nix-cachyos-kernel
|
||||||
|
url = ./nix-cachyos-kernel/
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./bootloader.nix
|
./bootloader.nix
|
||||||
|
./kernel.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
./users.nix
|
./users.nix
|
||||||
<home-manager/nixos>
|
<home-manager/nixos>
|
||||||
|
|
@ -75,6 +76,7 @@
|
||||||
curl
|
curl
|
||||||
wget
|
wget
|
||||||
cryptsetup
|
cryptsetup
|
||||||
|
cachix
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,6 @@
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
14
hardware.nix
14
hardware.nix
|
|
@ -61,4 +61,18 @@
|
||||||
|
|
||||||
services.thermald.enable = lib.mkDefault true;
|
services.thermald.enable = lib.mkDefault true;
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||||
|
|
||||||
|
# RAM Management
|
||||||
|
zramSwap.enable = true;
|
||||||
|
systemd.oomd = {
|
||||||
|
enable = true; # OOM Killer !!!
|
||||||
|
enableUserSlices = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{
|
||||||
|
device = "/var/lib/swapfile";
|
||||||
|
size = 16 * 1024; # 16 GiB
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
12
kernel.nix
Normal file
12
kernel.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs, system, ... }:
|
||||||
|
let
|
||||||
|
cachy-source = import ./nix-cachyos-kernel;
|
||||||
|
cachy-kernel =
|
||||||
|
cachy-source.outputs.legacyPackages.x86_64-linux.linuxPackages-cachyos-bore-lto-x86_64-v3; # .linux-cachyos-bore-lto-x86_64-v3;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
boot.kernelPackages = cachy-kernel;
|
||||||
|
|
||||||
|
nix.settings.substituters = [ "https://attic.xuyh0120.win/lantian" ];
|
||||||
|
nix.settings.trusted-public-keys = [ "lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc=" ];
|
||||||
|
}
|
||||||
1
nix-cachyos-kernel
Submodule
1
nix-cachyos-kernel
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 26da04e24aef2993ea256917be42d18f83ce8e8b
|
||||||
Loading…
Add table
Add a link
Reference in a new issue