Skip to content

Commit

Permalink
posts/2024-12-04/01: I want this block in verbatim
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Dec 4, 2024
1 parent a83aa61 commit 0853cc7
Showing 1 changed file with 41 additions and 43 deletions.
84 changes: 41 additions & 43 deletions posts/2024-12-04/01-praise-to-scdoc-to-generate-man-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,68 +107,66 @@ collaborating.

And here an example of a (summarised) man page in `.scd` format:

```
nixos-rebuild-ng(8)
nixos-rebuild-ng(8)

# NAME
# NAME

nixos-rebuild - reconfigure a NixOS machine
nixos-rebuild - reconfigure a NixOS machine

# SYNOPSIS
# SYNOPSIS

_nixos-rebuild_ \[--upgrade] [--upgrade-all]++
\[{switch,boot}]
_nixos-rebuild_ \[--upgrade] [--upgrade-all]++
\[{switch,boot}]

# DESCRIPTION
# DESCRIPTION

This command has one required argument, which specifies the desired operation.
It must be one of the following:
This command has one required argument, which specifies the desired operation.
It must be one of the following:

*switch*
Build and activate the new configuration, and make it the boot default.
That is, the configuration is added to the GRUB boot menu as the
default menu entry, so that subsequent reboots will boot the system
into the new configuration. Previous configurations activated with
nixos-rebuild switch or nixos-rebuild boot remain available in the GRUB
menu.
*switch*
Build and activate the new configuration, and make it the boot default.
That is, the configuration is added to the GRUB boot menu as the
default menu entry, so that subsequent reboots will boot the system
into the new configuration. Previous configurations activated with
nixos-rebuild switch or nixos-rebuild boot remain available in the GRUB
menu.

*boot*
Build the new configuration and make it the boot default (as with
*nixos-rebuild switch*), but do not activate it. That is, the system
continues to run the previous configuration until the next reboot.
*boot*
Build the new configuration and make it the boot default (as with
*nixos-rebuild switch*), but do not activate it. That is, the system
continues to run the previous configuration until the next reboot.

# OPTIONS
# OPTIONS

*--upgrade, --upgrade-all*
Update the root user's channel named 'nixos' before rebuilding the
system.
*--upgrade, --upgrade-all*
Update the root user's channel named 'nixos' before rebuilding the
system.

In addition to the 'nixos' channel, the root user's channels which have
a file named '.update-on-nixos-rebuild' in their base directory will
also be updated.
In addition to the 'nixos' channel, the root user's channels which have
a file named '.update-on-nixos-rebuild' in their base directory will
also be updated.

Passing *--upgrade-all* updates all of the root user's channels.
Passing *--upgrade-all* updates all of the root user's channels.

See the Nix manual, *nix flake lock --help* or *nix-build --help* for details.
See the Nix manual, *nix flake lock --help* or *nix-build --help* for details.

# ENVIRONMENT
# ENVIRONMENT

NIXOS_CONFIG
Path to the main NixOS configuration module. Defaults to
_/etc/nixos/configuration.nix_.
NIXOS_CONFIG
Path to the main NixOS configuration module. Defaults to
_/etc/nixos/configuration.nix_.

# FILES
# FILES

/etc/nixos/flake.nix
If this file exists, then *nixos-rebuild* will use it as if the
*--flake* option was given. This file may be a symlink to a
flake.nix in an actual flake; thus _/etc/nixos_ need not be a
flake.
/etc/nixos/flake.nix
If this file exists, then *nixos-rebuild* will use it as if the
*--flake* option was given. This file may be a symlink to a
flake.nix in an actual flake; thus _/etc/nixos_ need not be a
flake.

# AUTHORS
# AUTHORS

Nixpkgs/NixOS contributors
```
Nixpkgs/NixOS contributors

And here is a screenshot of the result:

Expand Down

0 comments on commit 0853cc7

Please sign in to comment.