Template:Evaluate: Difference between revisions
Add proper sections |
Adds support for recommending the `boot` and `test` subcommands for `nixos-rebuild`. Does nothing if the editor doesn't specifically request the non-standard actions. |
||
Line 1: | Line 1: | ||
<noinclude> | <noinclude>{{DISPLAYTITLE:Template:evaluate}} | ||
== About == | == About == | ||
This template is used to remind end-users that they need to rebuild for the changes to take effect. | This template is used to remind end-users that they need to rebuild for the changes to take effect. Optionally, you may define the action being suggested. | ||
== Usage == | == Usage == | ||
Evaluate | Default <code>Evaluate</code> Box: | ||
<pre> | <pre> | ||
<nowiki>{{Evaluate}}</nowiki> | <nowiki>{{Evaluate}}</nowiki> | ||
</pre> | |||
Boot <code>Evaluate</code> Box: | |||
<pre> | |||
<nowiki>{{Evaluate|boot}}</nowiki> | |||
</pre> | |||
Test <code>Evaluate</code> Box: | |||
<pre> | |||
<nowiki>{{Evaluate|test}}</nowiki> | |||
</pre> | </pre> | ||
== Example == | == Example == | ||
Default <code>Evaluate</code> Box: | |||
{{Evaluate}} | {{Evaluate}} | ||
Boot <code>Evaluate</code> Box: | |||
{{Evaluate|boot}} | |||
Test <code>Evaluate</code> Box: | |||
{{Evaluate|test}} | |||
</noinclude><includeonly>{{Tip | </noinclude><includeonly>{{Tip | ||
|1=In order to '''affect''' your system by your nix-language-specific changes you | |1=In order to '''affect''' your NixOS system by your nix-language-specific changes you must first '''evaluate''' it:{{Commands|$ nixos-rebuild {{{1|switch}}} --use-remote-sudo}}{{#ifeq: boot | {{{1}}} | Then, reboot:{{Commands|$ systemctl reboot}}}}{{#ifeq: test | {{{1}}} | '''Remember:''' any changes evaluated through <code>nixos-rebuild test</code> '''will not''' persist upon reboot.}}}}</includeonly> |
Revision as of 19:50, 27 October 2024
About
This template is used to remind end-users that they need to rebuild for the changes to take effect. Optionally, you may define the action being suggested.
Usage
Default Evaluate
Box:
{{Evaluate}}
Boot Evaluate
Box:
{{Evaluate|boot}}
Test Evaluate
Box:
{{Evaluate|test}}
Example
Default Evaluate
Box:
Boot Evaluate
Box:
Test Evaluate
Box: