Template:Evaluate: Difference between revisions
Appearance
Add --use-remote-sudo-less support to the template via the root=true attribute. |
types |
||
| Line 66: | Line 66: | ||
</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|{{#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> | |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> | ||
<noinclude> | |||
<templatedata> | |||
{ | |||
"params": { | |||
"root": { | |||
"type": "boolean", | |||
"default": "false" | |||
}, | |||
"type": { | |||
"aliases": [ | |||
"1" | |||
], | |||
"type": "string", | |||
"suggestedvalues": [ | |||
"boot", | |||
"test" | |||
] | |||
} | |||
}, | |||
"paramOrder": [ | |||
"root", | |||
"type" | |||
], | |||
"format": "inline" | |||
} | |||
</templatedata> | |||
</noinclude> | |||
Revision as of 21:43, 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 --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:
🟆︎
Tip: In order to affect your NixOS system by your nix-language-specific changes you must first evaluate it:
$ nixos-rebuild switch --use-remote-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 --use-remote-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 --use-remote-sudo
nixos-rebuild test will not persist upon reboot.
Default Evaluate Box without --use-remote-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 --use-remote-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 --use-remote-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 |
| type | type 1 | no description
| String | optional |