I just discovered a surprising downside of #NixOS: I set up 22.11 in a VM with 15GB disk space running xfce and no(!) additional packages except the defaults from the GUI installer. So it's an OOTB setup.

After not using it for maybe 2 months, I started "sudo nixos-rebuild switch --upgrade" and ran out of disk space. I could not even recover using "nix-collect-garbage --delete-old" (freed 4.5GB). 😔

Therefore: NixOS needs WAY more disk space than other distros even for the basic OS + xfce.

@publicvoit running a dev workstation with a half terabyte disk and it gets full at least once a week, which means collecting garbage and doing cargo clean in the projects.

Btw, it is highly recommended to save space by enabling hard links in the nix store (not a default):

https://github.com/pimeys/nixos/blob/main/core/default.nix#L73

And running the optimization once after enabling this setting by doing nix-store --optimise (can take a while). 50-100GB saved right there…

Follow

@pimeys @publicvoit ... additionally I have this in the config

```
# off-line deduplication
services.beesd.filesystems = {
root = {
spec = "LABEL=nixos";
hashTableSizeMB = 512;
verbosity = "crit";
extraOptions = [ "--loadavg-target" "2.0" ];
};
};

# Btrfs maintanance
# Without this, the free space is not reclaimed after many deletions.
systemd.services.balanceBtrfsRoot = (balanceBtrfs "/" "daily");

```

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.