main
nix 20 lines 498 Bytes
Raw
1 {
2 pkgs,
3 ...
4 }:
5
6 {
7 # apply microcode to fix functional and security issues
8 hardware.enableRedistributableFirmware = true;
9 hardware.cpu.amd.updateMicrocode = pkgs.stdenv.isx86_64;
10 hardware.cpu.intel.updateMicrocode = pkgs.stdenv.isx86_64;
11
12 # enable kernel same-page merging for improved vm test performance
13 hardware.ksm.enable = true;
14
15 # discard blocks weekly
16 services.fstrim.enable = true;
17
18 # use memory more efficiently at the cost of some compute
19 zramSwap.enable = true;
20 }