No description
Erwin Boskma
dab6303e3d
• Updated input 'emacs-overlay': 'github:nix-community/emacs-overlay/60fe647be71d6f433f4a8f9f22d7430bf0ef58a4' (2023-04-28) → 'github:nix-community/emacs-overlay/b04a264d5f566ce27e1d62eeae3eabaaa8e942ef' (2023-04-29) • Updated input 'home-manager': 'github:nix-community/home-manager/43ba4489bd3f9f69519f5f7ebdb76d0455eccbbe' (2023-04-28) → 'github:nix-community/home-manager/c4f3a3707104999d5b6fe4c4e5c3833980a92513' (2023-04-28) • Updated input 'nil': 'github:oxalica/nil/2710d6a568cf64fc870d6af9264355ea591e7337' (2023-04-28) → 'github:oxalica/nil/4dcb73894281644d4d29ffa337eff88d1d7ffd1a' (2023-04-29) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/d6b863fd9b7bb962e6f9fdf292419a775e772891' (2023-04-26) → 'github:nixos/nixpkgs/937a9d1ee7b1351d8c55fff6611a8edf6e7c1c37' (2023-04-28) • Updated input 'rust-overlay': 'github:oxalica/rust-overlay/2c22a41baadfac75a4af5303fc3ef8d4145b795b' (2023-04-28) → 'github:oxalica/rust-overlay/0bb45c519ebd64f6b4223e1bb6b4e08df80834ca' (2023-04-29) |
||
---|---|---|
home-manager/modules | ||
machines | ||
modules | ||
overlays | ||
pkgs | ||
users | ||
.envrc | ||
.gitignore | ||
.projectile | ||
.sops.yaml | ||
flake.lock | ||
flake.nix | ||
Justfile | ||
krops.nix | ||
README.org | ||
statix.toml |
Erwin's NixOS config
This configures my machines.
Useful oneliners
Remove all files except the smallest
$ ls -s size | head -n 1 | xargs stat -c %s | awk '{print $1 + 1}' | xargs -I '%S' fd -S +%Sb -X rm {} \;
cmd | Explanation |
---|---|
ls -s size |
List all files, sort by size (ls is aliased to exa in my setup) |
head -n 1 |
Take the first line |
xargs stat -c %s |
Print the size in bytes |
awk '{print $1 + 1} |
Add one to it |
xargs -I '%S' fd -S +%Sb -X rm {} \; |
Find all files larger than the smallest and delete them |