1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-26 21:19:45 +01:00

docs: replace console language with shell

This commit is contained in:
Viktor Kronvall 2023-12-02 09:19:09 +09:00
parent 67b797a377
commit eff22a27e2
18 changed files with 36 additions and 36 deletions

View file

@ -17,13 +17,13 @@ the `home-manager` command use it by either
1. overriding the default path by using the `-I` command line option: 1. overriding the default path by using the `-I` command line option:
``` console ``` shell
$ home-manager -I home-manager=$HOME/devel/home-manager $ home-manager -I home-manager=$HOME/devel/home-manager
``` ```
or, if using [flakes](#sec-flakes-standalone): or, if using [flakes](#sec-flakes-standalone):
``` console ``` shell
$ home-manager --override-input home-manager ~/devel/home-manager $ home-manager --override-input home-manager ~/devel/home-manager
``` ```

View file

@ -82,7 +82,7 @@ descriptions and the documentation of Home Manager can be generated and
opened by typing the following in a shell within a clone of the Home opened by typing the following in a shell within a clone of the Home
Manager Git repository: Manager Git repository:
``` console ``` shell
$ nix-build -A docs.html $ nix-build -A docs.html
$ xdg-open ./result/share/doc/home-manager/index.html $ xdg-open ./result/share/doc/home-manager/index.html
``` ```
@ -90,7 +90,7 @@ $ xdg-open ./result/share/doc/home-manager/index.html
When you have made changes to a module, it is a good idea to check that When you have made changes to a module, it is a good idea to check that
the man page version of the module options looks good: the man page version of the module options looks good:
``` console ``` shell
$ nix-build -A docs.manPages $ nix-build -A docs.manPages
$ man ./result/share/man/man5/home-configuration.nix.5.gz $ man ./result/share/man/man5/home-configuration.nix.5.gz
``` ```

View file

@ -14,7 +14,7 @@ but you should follow some basic guidelines:
as time zone. For example, \"2017-09-13T17:10:14+00:00\". A suitable as time zone. For example, \"2017-09-13T17:10:14+00:00\". A suitable
timestamp can be produced by the command timestamp can be produced by the command
``` console ``` shell
$ date --iso-8601=second --universal $ date --iso-8601=second --universal
``` ```

View file

@ -12,20 +12,20 @@ functions available in test scripts, you can look at NMT's
The full Home Manager test suite can be run by executing The full Home Manager test suite can be run by executing
``` console ``` shell
$ nix-shell --pure tests -A run.all $ nix-shell --pure tests -A run.all
``` ```
in the project root. List all test cases through in the project root. List all test cases through
``` console ``` shell
$ nix-shell --pure tests -A list $ nix-shell --pure tests -A list
``` ```
and run an individual test, for example `alacritty-empty-settings`, and run an individual test, for example `alacritty-empty-settings`,
through through
``` console ``` shell
$ nix-shell --pure tests -A run.alacritty-empty-settings $ nix-shell --pure tests -A run.alacritty-empty-settings
``` ```
@ -33,6 +33,6 @@ However, those invocations will impurely source the system's nixpkgs,
and may cause failures. To run against the nixpkgs from the flake.lock, and may cause failures. To run against the nixpkgs from the flake.lock,
use instead e.g. use instead e.g.
``` console ``` shell
$ nix develop --ignore-environment .#all $ nix develop --ignore-environment .#all
``` ```

View file

@ -10,7 +10,7 @@ installed manually, that is, packages that shows up when you run
For example, imagine you have the `hello` package installed in your For example, imagine you have the `hello` package installed in your
environment environment
``` console ``` shell
$ nix-env --query $ nix-env --query
hello-2.10 hello-2.10
``` ```
@ -24,7 +24,7 @@ home.packages = [ pkgs.hello ];
Then attempting to switch to this configuration will result in an error Then attempting to switch to this configuration will result in an error
similar to similar to
``` console ``` shell
$ home-manager switch $ home-manager switch
these derivations will be built: these derivations will be built:
/nix/store/xg69wsnd1rp8xgs9qfsjal017nf0ldhm-home-manager-path.drv /nix/store/xg69wsnd1rp8xgs9qfsjal017nf0ldhm-home-manager-path.drv

View file

@ -27,7 +27,7 @@ should work provided you have a Nix channel called `nixpkgs-unstable`.
You can add the `nixpkgs-unstable` channel by running You can add the `nixpkgs-unstable` channel by running
``` console ``` shell
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable $ nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable
$ nix-channel --update $ nix-channel --update
``` ```

View file

@ -10,14 +10,14 @@ your system configuration. This is most conveniently done by adding a
Home Manager channel. For example, if you are following Nixpkgs master Home Manager channel. For example, if you are following Nixpkgs master
or an unstable channel, you can run or an unstable channel, you can run
``` console ``` shell
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager $ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
$ nix-channel --update $ nix-channel --update
``` ```
and if you follow a Nixpkgs version 23.11 channel, you can run and if you follow a Nixpkgs version 23.11 channel, you can run
``` console ``` shell
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager $ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager
$ nix-channel --update $ nix-channel --update
``` ```

View file

@ -12,14 +12,14 @@ your system configuration. This is most conveniently done by adding a
Home Manager channel to the root user. For example, if you are following Home Manager channel to the root user. For example, if you are following
Nixpkgs master or an unstable channel, you can run Nixpkgs master or an unstable channel, you can run
``` console ``` shell
$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager $ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
$ sudo nix-channel --update $ sudo nix-channel --update
``` ```
and if you follow a Nixpkgs version 23.11 channel, you can run and if you follow a Nixpkgs version 23.11 channel, you can run
``` console ``` shell
$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager $ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager
$ sudo nix-channel --update $ sudo nix-channel --update
``` ```
@ -57,7 +57,7 @@ If `nixos-rebuild switch` does not result in the environment you expect,
you can take a look at the output of the Home Manager activation script you can take a look at the output of the Home Manager activation script
output using output using
``` console ``` shell
$ systemctl status "home-manager-$USER.service" $ systemctl status "home-manager-$USER.service"
``` ```
::: :::

View file

@ -14,14 +14,14 @@
2. Add the appropriate Home Manager channel. If you are following 2. Add the appropriate Home Manager channel. If you are following
Nixpkgs master or an unstable channel you can run Nixpkgs master or an unstable channel you can run
``` console ``` shell
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager $ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
$ nix-channel --update $ nix-channel --update
``` ```
and if you follow a Nixpkgs version 23.11 channel you can run and if you follow a Nixpkgs version 23.11 channel you can run
``` console ``` shell
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager $ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager
$ nix-channel --update $ nix-channel --update
``` ```
@ -29,7 +29,7 @@
3. Run the Home Manager installation command and create the first Home 3. Run the Home Manager installation command and create the first Home
Manager generation: Manager generation:
``` console ``` shell
$ nix-shell '<home-manager>' -A install $ nix-shell '<home-manager>' -A install
``` ```

View file

@ -42,6 +42,6 @@ command here may be `darwin-rebuild switch --flake <flake-uri>`.
You can use the above `flake.nix` as a template in `~/.config/darwin` by You can use the above `flake.nix` as a template in `~/.config/darwin` by
``` console ``` shell
$ nix flake new ~/.config/darwin -t github:nix-community/home-manager#nix-darwin $ nix flake new ~/.config/darwin -t github:nix-community/home-manager#nix-darwin
``` ```

View file

@ -42,6 +42,6 @@ command for the system, such as
You can use the above `flake.nix` as a template in `/etc/nixos` by You can use the above `flake.nix` as a template in `/etc/nixos` by
``` console ``` shell
$ nix flake new /etc/nixos -t github:nix-community/home-manager#nixos $ nix flake new /etc/nixos -t github:nix-community/home-manager#nixos
``` ```

View file

@ -29,7 +29,7 @@
- Alternatively, you can enable flakes on a per-command basis with - Alternatively, you can enable flakes on a per-command basis with
the following additional flags to `nix` and `home-manager`: the following additional flags to `nix` and `home-manager`:
``` console ``` shell
$ nix --extra-experimental-features "nix-command flakes" <sub-commands> $ nix --extra-experimental-features "nix-command flakes" <sub-commands>
$ home-manager --extra-experimental-features "nix-command flakes" <sub-commands> $ home-manager --extra-experimental-features "nix-command flakes" <sub-commands>
``` ```

View file

@ -7,13 +7,13 @@ flake.
For example, if you are using the unstable version of Nixpkgs or NixOS, For example, if you are using the unstable version of Nixpkgs or NixOS,
then to generate and activate a basic configuration run the command then to generate and activate a basic configuration run the command
``` console ``` shell
$ nix run home-manager/master -- init --switch $ nix run home-manager/master -- init --switch
``` ```
For Nixpkgs or NixOS version 23.11 run For Nixpkgs or NixOS version 23.11 run
``` console ``` shell
$ nix run home-manager/release-23.11 -- init --switch $ nix run home-manager/release-23.11 -- init --switch
``` ```
@ -24,7 +24,7 @@ If you omit the `--switch` option then the activation will not happen.
This is useful if you want to inspect and edit the configuration before This is useful if you want to inspect and edit the configuration before
activating it. activating it.
``` console ``` shell
$ nix run home-manager/$branch -- init $ nix run home-manager/$branch -- init
$ # Edit files in ~/.config/home-manager $ # Edit files in ~/.config/home-manager
$ nix run home-manager/$branch -- init --switch $ nix run home-manager/$branch -- init --switch
@ -35,14 +35,14 @@ Where `$branch` is one of `master` or `release-23.11`.
After the initial activation has completed successfully then building After the initial activation has completed successfully then building
and activating your flake-based configuration is as simple as and activating your flake-based configuration is as simple as
``` console ``` shell
$ home-manager switch $ home-manager switch
``` ```
It is possible to override the default configuration directory, if you It is possible to override the default configuration directory, if you
want. For example, want. For example,
``` console ``` shell
$ nix run home-manager/$branch -- init --switch ~/hmconf $ nix run home-manager/$branch -- init --switch ~/hmconf
$ # And after the initial activation. $ # And after the initial activation.
$ home-manager switch --flake ~/hmconf $ home-manager switch --flake ~/hmconf

View file

@ -30,7 +30,7 @@ programs.emacs.enable = "yes";
then building it, for example using `home-manager build`, will result in then building it, for example using `home-manager build`, will result in
an error message saying something like an error message saying something like
``` console ```console
$ home-manager build $ home-manager build
error: A definition for option `programs.emacs.enable' is not of type `boolean'. Definition values: error: A definition for option `programs.emacs.enable' is not of type `boolean'. Definition values:
- In `/home/jdoe/.config/home-manager/home.nix': "yes" - In `/home/jdoe/.config/home-manager/home.nix': "yes"
@ -45,7 +45,7 @@ there also find information about the default value and a description of
the option. You can find the complete option documentation in the option. You can find the complete option documentation in
[Home Manager Configuration Options](#ch-options) or directly in the terminal by running [Home Manager Configuration Options](#ch-options) or directly in the terminal by running
``` console ``` shell
man home-configuration.nix man home-configuration.nix
``` ```

View file

@ -98,13 +98,13 @@ follows:
To activate this configuration you can run To activate this configuration you can run
``` console ``` shell
home-manager switch home-manager switch
``` ```
or if you are not feeling so lucky, or if you are not feeling so lucky,
``` console ``` shell
home-manager build home-manager build
``` ```

View file

@ -27,7 +27,7 @@ For example, suppose you have a wonderful, painstakingly created
to your configuration. Attempting to switch to the generation will then to your configuration. Attempting to switch to the generation will then
result in result in
``` console ``` shell
$ home-manager switch $ home-manager switch
Activating checkLinkTargets Activating checkLinkTargets

View file

@ -7,7 +7,7 @@ do so are
1. Run `home-manager generations` to determine which generation you 1. Run `home-manager generations` to determine which generation you
wish to rollback to: wish to rollback to:
``` console ``` shell
$ home-manager generations $ home-manager generations
2018-01-04 11:56 : id 765 -> /nix/store/kahm1rxk77mnvd2l8pfvd4jkkffk5ijk-home-manager-generation 2018-01-04 11:56 : id 765 -> /nix/store/kahm1rxk77mnvd2l8pfvd4jkkffk5ijk-home-manager-generation
2018-01-03 10:29 : id 764 -> /nix/store/2wsmsliqr5yynqkdyjzb1y57pr5q2lsj-home-manager-generation 2018-01-03 10:29 : id 764 -> /nix/store/2wsmsliqr5yynqkdyjzb1y57pr5q2lsj-home-manager-generation
@ -25,7 +25,7 @@ do so are
3. Run the `activate` script inside the copied store path: 3. Run the `activate` script inside the copied store path:
``` console ``` shell
$ /nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation/activate $ /nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation/activate
Starting home manager activation Starting home manager activation

View file

@ -4,7 +4,7 @@ If you have installed Home Manager using the Nix channel method then
updating Home Manager is done by first updating the channel. You can updating Home Manager is done by first updating the channel. You can
then switch to the updated Home Manager environment. then switch to the updated Home Manager environment.
``` console ``` shell
$ nix-channel --update $ nix-channel --update
unpacking channels... unpacking channels...