From b1a7366eb43ffc0bdb4cb9ad76bfbe9ace6983e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 31 Oct 2022 13:31:37 -0300 Subject: [PATCH] monolith: compress btrfs volumes --- hosts/monolith.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hosts/monolith.nix b/hosts/monolith.nix index 6d4d951..f79b928 100644 --- a/hosts/monolith.nix +++ b/hosts/monolith.nix @@ -1,7 +1,9 @@ # 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, ... }: { +{ config, lib, pkgs, modulesPath, ... }: let + btrfs_options = [ "compress=zstd:3" "noatime" ]; +in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; @@ -39,17 +41,17 @@ fileSystems."/home" = { device = "/dev/disk/by-label/BTRFS_ROOT"; fsType = "btrfs"; - options = [ "subvol=home" ]; + options = [ "subvol=home" ] ++ btrfs_options; }; fileSystems."/home/lelgenio/Games" = { device = "/dev/disk/by-label/BTRFS_DATA"; fsType = "btrfs"; - options = [ "subvol=@games" "nofail" ]; + options = [ "subvol=@games" "nofail" ] ++ btrfs_options; }; fileSystems."/home/lelgenio/Downloads/Torrents" = { device = "/dev/disk/by-label/BTRFS_DATA"; fsType = "btrfs"; - options = [ "subvol=@torrents" "nofail" ]; + options = [ "subvol=@torrents" "nofail" ] ++ btrfs_options; }; services.udev.extraRules = '' ACTION=="add", SUBSYSTEM=="pci", DRIVER=="pcieport", ATTR{power/wakeup}="disabled"