Last active
April 14, 2020 20:57
-
-
Save dominicusin/d893d3dea0fac20a7175237ad38fcb96 to your computer and use it in GitHub Desktop.
nixos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh --verbose | |
nix-collect-garbage -d | |
nix-store --gc | |
nix-store --verify --check-contents --repair | |
nix-store --optimise | |
chattr -R +c / | |
btrfs device scan --all-devices | |
for filesystem in $(mount -t btrfs | awk '{print $3}' ) | |
do | |
mount -o remount,clear_cache,compress=zlib,rw $filesystem | |
btrfs property set $filesystem compression zlib | |
btrfs filesystem resize max $filesystem | |
btrfs filesystem sync $filesystem | |
done | |
btrfs scrub start -BdRf / | |
btrfs fi def -czlib -v -r -f / | |
btrfs balance start -v -f --full-balance -dconvert=single,usage=99 -mconvert=single,usage=99 -sconvert=single,usage=99 / | |
bedup dedup | |
fdupes -r -S / | duperemove --fdupes | |
duperemove -drh /* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment