User:SigmaSquadron/Template:Evaluate: Difference between revisions
Line 61: | Line 61: | ||
<pre> | <pre> | ||
<nowiki>{{Evaluate|boot}}</nowiki> | <nowiki>{{Evaluate|action=boot}}</nowiki> | ||
</pre> | </pre> | ||
Line 68: | Line 68: | ||
<pre> | <pre> | ||
<nowiki>{{Evaluate| | <nowiki>{{Evaluate|action=test}}</nowiki> | ||
</pre> | </pre> | ||
Line 83: | Line 83: | ||
</noinclude><includeonly>{{Tip | </noinclude><includeonly>{{Tip | ||
|1=In order to '''affect''' your NixOS system by your nix-language-specific changes you must first '''evaluate''' it:{{Commands|$ nixos-rebuild {{{action|switch}}} --use-remote-sudo}}{{#ifeq: boot | {{{action}}} | Then, reboot:{{Commands|$ systemctl reboot}}}}{{#ifeq: test | {{{action}}} | '''Remember:''' any changes evaluated through <code>nixos-rebuild test</code> '''will not''' persist upon reboot.}}}}</includeonly> | |1=In order to '''affect''' your NixOS system by your nix-language-specific changes you must first '''evaluate''' it:{{Commands|$ nixos-rebuild {{{action|switch}}} --use-remote-sudo}}{{#ifeq: boot | {{{action}}} | Then, reboot:{{Commands|$ systemctl reboot}}}}{{#ifeq: test | {{{action}}} | '''Remember:''' any changes evaluated through <code>nixos-rebuild test</code> '''will not''' persist upon reboot.}}}}</includeonly> | ||
</syntaxhighlight> | |||
== Code (No --use-remote-sudo) == | |||
<syntaxhighlight lang=html> | |||
<noinclude>{{DISPLAYTITLE:Template:evaluate}} | |||
== About == | |||
This template is used to remind end-users that they need to rebuild for the changes to take effect. The optional attribute <code>action</code> can be used to define the subcommand suggested by the tip. | |||
== Usage == | |||
Default <code>Evaluate</code> Box: | |||
<pre> | |||
<nowiki>{{Evaluate}}</nowiki> | |||
</pre> | |||
Boot <code>Evaluate</code> Box: | |||
<pre> | |||
<nowiki>{{Evaluate|action=boot}}</nowiki> | |||
</pre> | |||
Test <code>Evaluate</code> Box: | |||
<pre> | |||
<nowiki>{{Evaluate|action=boot}}</nowiki> | |||
</pre> | |||
== Example == | |||
Default <code>Evaluate</code> Box: | |||
{{Evaluate}} | |||
Boot <code>Evaluate</code> Box: | |||
{{Evaluate|action=boot}} | |||
Test <code>Evaluate</code> Box: | |||
{{Evaluate|action=test}} | |||
</noinclude><includeonly>{{Tip | |||
|1=In order to '''affect''' your NixOS system by your nix-language-specific changes you must first '''evaluate''' it:{{Commands|# nixos-rebuild {{{action|switch}}}}}{{#ifeq: boot | {{{action}}} | Then, reboot:{{Commands|$ systemctl reboot}}}}{{#ifeq: test | {{{action}}} | '''Remember:''' any changes evaluated through <code>nixos-rebuild test</code> '''will not''' persist upon reboot.}}}}</includeonly> | |||
</syntaxhighlight> | |||
== Code (Anonymous) == | |||
<syntaxhighlight lang=html> | |||
<noinclude>{{DISPLAYTITLE:Template:evaluate}} | |||
== About == | |||
This template is used to remind end-users that they need to rebuild for the changes to take effect. The optional attribute <code>action</code> can be used to define the subcommand suggested by the tip. | |||
== Usage == | |||
Default <code>Evaluate</code> Box: | |||
<pre> | |||
<nowiki>{{Evaluate}}</nowiki> | |||
</pre> | |||
Boot <code>Evaluate</code> Box: | |||
<pre> | |||
<nowiki>{{Evaluate|boot}}</nowiki> | |||
</pre> | |||
Test <code>Evaluate</code> Box: | |||
<pre> | |||
<nowiki>{{Evaluate|boot}}</nowiki> | |||
</pre> | |||
== Example == | |||
Default <code>Evaluate</code> Box: | |||
{{Evaluate}} | |||
Boot <code>Evaluate</code> Box: | |||
{{Evaluate|boot}} | |||
Test <code>Evaluate</code> Box: | |||
{{Evaluate|test}} | |||
</noinclude><includeonly>{{Tip | |||
|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> | |||
</syntaxhighlight> | </syntaxhighlight> |