Template:Evaluate: Difference between revisions
Appearance
	
	
imported>Samueldr No edit summary  | 
				m update  | 
				||
| (9 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
<noinclude>  | <noinclude>{{DISPLAYTITLE:Template:evaluate}}  | ||
This template is used to remind end-users that they need to rebuild for the changes to take effect.  | |||
== 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   | Default <code>Evaluate</code> Box:  | ||
<pre>  | <pre>  | ||
| Line 10: | Line 12: | ||
</pre>  | </pre>  | ||
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>--sudo</code>:  | |||
<pre>  | |||
<nowiki>{{Evaluate|root=true}}</nowiki>  | |||
</pre>  | |||
Boot <code>Evaluate</code> Box without <code>--sudo</code>:  | |||
<pre>  | |||
<nowiki>{{Evaluate|boot|root=true}}</nowiki>  | |||
</pre>  | |||
Test <code>Evaluate</code> Box without <code>--sudo</code>:  | |||
<pre>  | |||
<nowiki>{{Evaluate|test|root=true}}</nowiki>  | |||
</pre>  | |||
== Example ==  | |||
Default <code>Evaluate</code> Box:  | |||
{{Evaluate}}  | {{Evaluate}}  | ||
Boot <code>Evaluate</code> Box:  | |||
{{Evaluate|boot}}  | |||
Test <code>Evaluate</code> Box:  | |||
{{Evaluate|test}}  | |||
Default <code>Evaluate</code> Box without <code>--sudo</code>:  | |||
{{Evaluate|root=true}}  | |||
Boot <code>Evaluate</code> Box without <code>--sudo</code>:  | |||
{{Evaluate|boot|root=true}}  | |||
Test <code>Evaluate</code> Box without <code>--sudo</code>:  | |||
{{Evaluate|test|root=true}}  | |||
</noinclude><includeonly>{{Tip  | </noinclude><includeonly>{{Tip  | ||
|1=In order to   | |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|}}} ||--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>  | ||
<noinclude>  | |||
<templatedata>  | |||
{  | |||
	"params": {  | |||
		"1": {  | |||
			"aliases": [  | |||
				"type"  | |||
			],  | |||
			"type": "string",  | |||
			"suggestedvalues": [  | |||
				"boot",  | |||
				"test"  | |||
			]  | |||
		},  | |||
		"root": {  | |||
			"type": "boolean",  | |||
			"default": "false"  | |||
		}  | |||
	},  | |||
	"paramOrder": [  | |||
		"root",  | |||
		"1"  | |||
	],  | |||
	"format": "inline"  | |||
}  | |||
</templatedata>  | |||
</noinclude>  | |||
Latest revision as of 22:03, 27 August 2025
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 --sudo:
{{Evaluate|root=true}}
Boot Evaluate Box without --sudo:
{{Evaluate|boot|root=true}}
Test Evaluate Box without --sudo:
{{Evaluate|test|root=true}}
Example
Default Evaluate Box:
🟆︎
Tip: In order to affect your NixOS system by your nix-language-specific changes you must first evaluate it:
$ nixos-rebuild switch --sudo
Boot Evaluate Box:
🟆︎
Tip: In order to affect your NixOS system by your nix-language-specific changes you must first evaluate it:Then, reboot:
$ nixos-rebuild boot --sudo
$ systemctl reboot
Test Evaluate Box:
🟆︎
Tip: In order to affect your NixOS system by your nix-language-specific changes you must first evaluate it:Remember: any changes evaluated through 
$ nixos-rebuild test --sudo
nixos-rebuild test will not persist upon reboot.
Default Evaluate Box without --sudo:
🟆︎
Tip: In order to affect your NixOS system by your nix-language-specific changes you must first evaluate it:
# nixos-rebuild switch
Boot Evaluate Box without --sudo:
🟆︎
Tip: In order to affect your NixOS system by your nix-language-specific changes you must first evaluate it:Then, reboot:
# nixos-rebuild boot
# systemctl reboot
Test Evaluate Box without --sudo:
🟆︎
Tip: In order to affect your NixOS system by your nix-language-specific changes you must first evaluate it:Remember: any changes evaluated through 
# nixos-rebuild test
nixos-rebuild test will not persist upon reboot.
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| root | root | no description 
  | Boolean | optional | 
| 1 | 1 type | no description 
  | String | optional |