From d352303d26a912f44b0d1b10a6f0797f268aba1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 12 Jun 2021 11:09:46 +0100 Subject: [PATCH] compress skinny --- .../boxes/skinnyv/hardware-configuration.nix | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/nixos/boxes/skinnyv/hardware-configuration.nix b/nixos/boxes/skinnyv/hardware-configuration.nix index d0136636..6c79107b 100644 --- a/nixos/boxes/skinnyv/hardware-configuration.nix +++ b/nixos/boxes/skinnyv/hardware-configuration.nix @@ -1,31 +1,35 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/9dba116f-c9fe-403a-a8e2-f9fdab23f1f1"; - fsType = "btrfs"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/9dba116f-c9fe-403a-a8e2-f9fdab23f1f1"; + fsType = "btrfs"; + options = [ "compress=zstd" ]; + }; boot.initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/0c192a18-178f-4598-a1ed-5295ef2abdc4"; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/0A6A-AAFC"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/0A6A-AAFC"; + fsType = "vfat"; + }; swapDevices = [ ]; + zramSwap = { + enable = true; + algorithm = "zstd"; + memoryPercent = 25; + }; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; }