🏡 my personal home lab
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

optimize for emmc

+46 -4
+46 -4
modules/common.nix
··· 15 15 ]; 16 16 17 17 nixpkgs.config.allowUnfree = true; 18 - nix.settings.experimental-features = [ 19 - "nix-command" 20 - "flakes" 21 - ]; 18 + nix = { 19 + settings = { 20 + experimental-features = [ 21 + "nix-command" 22 + "flakes" 23 + ]; 24 + auto-optimise-store = true; 25 + }; 26 + gc = { 27 + automatic = true; 28 + dates = "weekly"; 29 + options = "--delete-older-than 7d"; 30 + }; 31 + }; 22 32 23 33 # Set your time zone. 24 34 time.timeZone = "Europe/Zurich"; ··· 81 91 }; 82 92 }; 83 93 }; 94 + 95 + # eMMC optimizations 96 + # don't write access time to save ssd and commit every 30sec 97 + # (risk of losing 30sec of data on crash) 98 + fileSystems."/".options = [ 99 + "noatime" 100 + "commit=30" 101 + ]; 102 + services.fstrim = { 103 + enable = true; 104 + interval = "weekly"; 105 + }; 106 + # no swap 107 + swapDevices = [ ]; 108 + # systemd logs in ram 109 + services.journald.extraConfig = '' 110 + Storage=volatile 111 + RuntimeMaxUse=30M 112 + ''; 113 + # /tmp in ram 114 + boot.tmp = { 115 + useTmpfs = true; 116 + tmpfsSize = "25%"; 117 + }; 118 + # don't write crash dumps 119 + systemd.coredump.extraConfig = '' 120 + Storage=none 121 + ProcessSizeMax=0 122 + ''; 123 + # don't build man pages 124 + documentation.enable = false; 125 + documentation.man.generateCaches = false; 84 126 85 127 # mount synology nas nfs 86 128 boot.supportedFilesystems = [ "nfs" ];