Template:Evaluate: Difference between revisions

From NixOS Wiki
imported>Fadenb
m Syntaxhighlight
Add --use-remote-sudo-less support to the template via the root=true attribute.
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>{{DISPLAYTITLE:Template:evaluate}}
 
== 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 ==
== Usage ==
Evaluate box:
 
Default <code>Evaluate</code> Box:
 
<pre>
<pre>
<nowiki>{{Evaluate}}</nowiki>
<nowiki>{{Evaluate}}</nowiki>
</pre>
</pre>
</noinclude>
 
<table cellspacing="0" cellpadding="0" border="0" style="background: transparent; margin-top:0.5em;border:1px #b32424 solid;padding:0.5em;background-color: #ADD8E6"><tr><td nowrap="nowrap" valign="top">'''Note:''' In order to '''affect''' your system by your nix-language-specific changes you have to '''evaluate''' it, run (as root):</tr><tr><td><syntaxhighlight lang="console">$ nixos-rebuild switch</syntaxhighlight></td></tr></table>
Boot <code>Evaluate</code> Box:
 
<pre>
<nowiki>{{Evaluate|boot}}</nowiki>
</pre>
 
 
Test <code>Evaluate</code> Box:
 
<pre>
<nowiki>{{Evaluate|test}}</nowiki>
</pre>
 
Default <code>Evaluate</code> Box without <code>--use-remote-sudo</code>:
 
<pre>
<nowiki>{{Evaluate|root=true}}</nowiki>
</pre>
 
 
Boot <code>Evaluate</code> Box without <code>--use-remote-sudo</code>:
 
<pre>
<nowiki>{{Evaluate|boot|root=true}}</nowiki>
</pre>
 
 
Test <code>Evaluate</code> Box without <code>--use-remote-sudo</code>:
 
<pre>
<nowiki>{{Evaluate|test|root=true}}</nowiki>
</pre>
 
== Example ==
Default <code>Evaluate</code> Box:
{{Evaluate}}
 
Boot <code>Evaluate</code> Box:
{{Evaluate|boot}}
 
Test <code>Evaluate</code> Box:
{{Evaluate|test}}
 
Default <code>Evaluate</code> Box without <code>--use-remote-sudo</code>:
{{Evaluate|root=true}}
 
Boot <code>Evaluate</code> Box without <code>--use-remote-sudo</code>:
{{Evaluate|boot|root=true}}
 
Test <code>Evaluate</code> Box without <code>--use-remote-sudo</code>:
{{Evaluate|test|root=true}}
 
</noinclude><includeonly>{{Tip
|1=In order to affect your NixOS system by your nix-language-specific changes you must first '''evaluate''' it:{{Commands|{{#if: {{{root|}}}|#|$}} nixos-rebuild {{{1|switch}}} {{#if: {{{root|}}} ||--use-remote-sudo}}}}{{#ifeq: boot | {{{1}}} | Then, reboot:{{Commands|{{#if: {{{root|}}}|<nowiki>#</nowiki>|$}} systemctl reboot}}}}{{#ifeq: test | {{{1}}} | '''Remember:''' any changes evaluated through <code>nixos-rebuild test</code> '''will not''' persist upon reboot.}}}}</includeonly>

Latest revision as of 21:40, 30 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}}

Default Evaluate Box without --use-remote-sudo:

{{Evaluate|root=true}}


Boot Evaluate Box without --use-remote-sudo:

{{Evaluate|boot|root=true}}


Test Evaluate Box without --use-remote-sudo:

{{Evaluate|test|root=true}}

Example

Default Evaluate Box:

Boot Evaluate Box:

Test Evaluate Box:

Default Evaluate Box without --use-remote-sudo:

Boot Evaluate Box without --use-remote-sudo:

Test Evaluate Box without --use-remote-sudo: