Storage optimization: Difference between revisions
No edit summary |
m Fix trailing typo. Tags: Mobile edit Mobile web edit |
||
Line 2: | Line 2: | ||
== Optimising the store == | == Optimising the store == | ||
Here we demonstrate how to configure <code>nix</code> to save space via hardlinking store files. | Here, we demonstrate how to configure <code>nix</code> to save space via hardlinking store files. | ||
=== Automatic === | === Automatic === | ||
To turn on periodic optimisation of the nix store, set the following option in <code>/etc/nixos/configuration.nix</code>: | To turn on periodic optimisation of the nix store, set the following option in <code>/etc/nixos/configuration.nix</code>: | ||
Line 21: | Line 21: | ||
Run | Run | ||
{{ic|# nix-store --optimise}}. | {{ic|# nix-store --optimise}}. | ||
This is a potentially long operation. | This is a potentially long operation. | ||
== Garbage collection == | == Garbage collection == |