Doas: Difference between revisions
Include git in Configuration codeblock for easy skimming. Adds boilerplate to add the pkgs reference, and formats sudo to be above doas for easier reading since both doas and sudo are 4 characters long. |
Add instructions for rebuilding without Git in system packages |
||
| Line 36: | Line 36: | ||
environment.systemPackages = [ pkgs.git ]; | environment.systemPackages = [ pkgs.git ]; | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
</translate> | |||
<translate> | |||
== Rebuilding without Git in system packages == | |||
</translate> | |||
<translate> | |||
If you've forgotten to add Git to your system packages, and you need to rebuild your system, you can either: | |||
# Reboot to select the last generation without doas | |||
# Enter a Nix shell as root, with the git package. Then, run your nixos-rebuild command with git being in your environment.systemPackages. | |||
</translate> | |||
<translate> | |||
$ doas su | |||
$ nix shell nixpkgs#git # Or you can use the legacy syntax `nix-shell -p git` | |||
$ nixos-rebuild --flake /path/to/your/flake#your-hostname test | |||
</translate> | |||
<translate> | |||
If everything looks good, you can now add it to your boot options. | |||
</translate> | |||
<translate> | |||
$ exit | |||
$ doas nixos-rebuild --flake /path/to/your/flake#your-hostname switch | |||
</translate> | </translate> | ||
[[Category:Applications]] | [[Category:Applications]] | ||
[[Category:Security]] | [[Category:Security]] | ||