NixOS Generations Trimmer: Difference between revisions

imported>Nix
move to gist to deal with formatting issues
imported>Nix
reorganize page
Line 13: Line 13:
* If you are a normal user, you can run on either the <code>home-manager</code> or <code>channels</code> profiles too.
* If you are a normal user, you can run on either the <code>home-manager</code> or <code>channels</code> profiles too.


=== Example script output ===
== Script (trim-generations.sh) ==


==== Without parameters (defaults) ====
The script is available here: [https://gist.github.com/Bondrake/27555c9d02c2882fd5e32f8ab3ed620b Github Gist - NixOS: trim-generations.sh]
 
== Example script output ==
 
=== Without parameters (defaults) ===


<syntaxHighlight lang=bash>
<syntaxHighlight lang=bash>
Line 37: Line 41:
</syntaxHighlight>
</syntaxHighlight>


==== With parameters ====
=== With parameters ===


<syntaxHighlight lang=bash>
<syntaxHighlight lang=bash>
Line 66: Line 70:
</syntaxHighlight>
</syntaxHighlight>


==== With parameters (not enough though) ====
=== With parameters (not enough though) ===


Example if you accidentally don't specify all parameters / arguments.
Example if you accidentally don't specify all parameters / arguments.
Line 87: Line 91:
</syntaxHighlight>
</syntaxHighlight>


==== Run as root (default) ====
=== Run as root (default) ===


<syntaxHighlight lang=bash>
<syntaxHighlight lang=bash>
Line 109: Line 113:
</syntaxHighlight>
</syntaxHighlight>


==== Run as root (on system profile) ====
=== Run as root (on system profile) ===


<syntaxHighlight lang=bash>
<syntaxHighlight lang=bash>
Line 129: Line 133:
</syntaxHighlight>
</syntaxHighlight>


==== Run as root (wrong profile) ====
=== Run as root (wrong profile) ===


Example if you accidentally give wrong profile (no home-manager on root):
Example if you accidentally give wrong profile (no home-manager on root):
Line 151: Line 155:




 
[[Category:Guide]]
 
 
== Script (trim-generations.sh) ==
 
The script is available here: [https://gist.github.com/Bondrake/27555c9d02c2882fd5e32f8ab3ed620b Github Gist - NixOS: trim-generations.sh]