feat(system): add zram swap
This commit is contained in:
parent
041ce07092
commit
730683518c
|
@ -39,11 +39,6 @@ in with builtins; {
|
|||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# improve memory performance
|
||||
zramSwap.enable = true;
|
||||
zramSwap.algorithm = "zstd";
|
||||
zramSwap.memoryPercent = 150;
|
||||
|
||||
networking.domain = "home.felschr.com";
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./i18n.nix ./nix.nix ./networking.nix ./hardened.nix ];
|
||||
imports = [ ./zram.nix ./i18n.nix ./nix.nix ./networking.nix ./hardened.nix ];
|
||||
|
||||
environment.systemPackages = with pkgs; [ wget curl openssl neovim ];
|
||||
}
|
||||
|
|
8
system/zram.nix
Normal file
8
system/zram.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
zramSwap.enable = true;
|
||||
zramSwap.memoryPercent = 100;
|
||||
zramSwap.memoryMax = 16 * 1024 * 1024 * 1024;
|
||||
boot.kernel.sysctl."vm.swappiness" = 100;
|
||||
}
|
Loading…
Reference in a new issue