From 9ebc8a51ed0538b38b21e7e386baa6386a85c539 Mon Sep 17 00:00:00 2001 From: Viktor Kronvall Date: Sat, 2 Dec 2023 09:19:09 +0900 Subject: [PATCH] docs: replace `console` language with `shell` --- docs/manual/contributing/getting-started.md | 4 ++-- docs/manual/contributing/guidelines.md | 4 ++-- docs/manual/contributing/news.md | 2 +- docs/manual/contributing/tests.md | 8 ++++---- docs/manual/faq/collision.md | 4 ++-- docs/manual/faq/unstable.md | 2 +- docs/manual/installation/nix-darwin.md | 4 ++-- docs/manual/installation/nixos.md | 6 +++--- docs/manual/installation/standalone.md | 6 +++--- docs/manual/nix-flakes/nix-darwin.md | 2 +- docs/manual/nix-flakes/nixos.md | 2 +- docs/manual/nix-flakes/prerequisites.md | 2 +- docs/manual/nix-flakes/standalone.md | 10 +++++----- docs/manual/usage.md | 4 ++-- docs/manual/usage/configuration.md | 4 ++-- docs/manual/usage/dotfiles.md | 2 +- docs/manual/usage/rollbacks.md | 4 ++-- docs/manual/usage/updating.md | 2 +- 18 files changed, 36 insertions(+), 36 deletions(-) diff --git a/docs/manual/contributing/getting-started.md b/docs/manual/contributing/getting-started.md index 740c8e6b..d527ebd8 100644 --- a/docs/manual/contributing/getting-started.md +++ b/docs/manual/contributing/getting-started.md @@ -17,13 +17,13 @@ the `home-manager` command use it by either 1. overriding the default path by using the `-I` command line option: - ``` console + ``` shell $ home-manager -I home-manager=$HOME/devel/home-manager ``` or, if using [flakes](#sec-flakes-standalone): - ``` console + ``` shell $ home-manager --override-input home-manager ~/devel/home-manager ``` diff --git a/docs/manual/contributing/guidelines.md b/docs/manual/contributing/guidelines.md index a5c4942b..6094539e 100644 --- a/docs/manual/contributing/guidelines.md +++ b/docs/manual/contributing/guidelines.md @@ -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 Manager Git repository: -``` console +``` shell $ nix-build -A docs.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 the man page version of the module options looks good: -``` console +``` shell $ nix-build -A docs.manPages $ man ./result/share/man/man5/home-configuration.nix.5.gz ``` diff --git a/docs/manual/contributing/news.md b/docs/manual/contributing/news.md index 2c3a59d3..80e1b0df 100644 --- a/docs/manual/contributing/news.md +++ b/docs/manual/contributing/news.md @@ -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 timestamp can be produced by the command - ``` console + ``` shell $ date --iso-8601=second --universal ``` diff --git a/docs/manual/contributing/tests.md b/docs/manual/contributing/tests.md index ccebfc12..bc3956ae 100644 --- a/docs/manual/contributing/tests.md +++ b/docs/manual/contributing/tests.md @@ -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 -``` console +``` shell $ nix-shell --pure tests -A run.all ``` in the project root. List all test cases through -``` console +``` shell $ nix-shell --pure tests -A list ``` and run an individual test, for example `alacritty-empty-settings`, through -``` console +``` shell $ 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, use instead e.g. -``` console +``` shell $ nix develop --ignore-environment .#all ``` diff --git a/docs/manual/faq/collision.md b/docs/manual/faq/collision.md index 3e72f081..543b588c 100644 --- a/docs/manual/faq/collision.md +++ b/docs/manual/faq/collision.md @@ -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 environment -``` console +``` shell $ nix-env --query hello-2.10 ``` @@ -24,7 +24,7 @@ home.packages = [ pkgs.hello ]; Then attempting to switch to this configuration will result in an error similar to -``` console +``` shell $ home-manager switch these derivations will be built: /nix/store/xg69wsnd1rp8xgs9qfsjal017nf0ldhm-home-manager-path.drv diff --git a/docs/manual/faq/unstable.md b/docs/manual/faq/unstable.md index 1cfa4fbd..84f23a58 100644 --- a/docs/manual/faq/unstable.md +++ b/docs/manual/faq/unstable.md @@ -27,7 +27,7 @@ should work provided you have a Nix channel called `nixpkgs-unstable`. You can add the `nixpkgs-unstable` channel by running -``` console +``` shell $ nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable $ nix-channel --update ``` diff --git a/docs/manual/installation/nix-darwin.md b/docs/manual/installation/nix-darwin.md index 7e4e0863..071006fb 100644 --- a/docs/manual/installation/nix-darwin.md +++ b/docs/manual/installation/nix-darwin.md @@ -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 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 --update ``` 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 --update ``` diff --git a/docs/manual/installation/nixos.md b/docs/manual/installation/nixos.md index 1bc995a4..18a60e96 100644 --- a/docs/manual/installation/nixos.md +++ b/docs/manual/installation/nixos.md @@ -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 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 --update ``` 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 --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 output using -``` console +``` shell $ systemctl status "home-manager-$USER.service" ``` ::: diff --git a/docs/manual/installation/standalone.md b/docs/manual/installation/standalone.md index a4fb101a..7ca38ef6 100644 --- a/docs/manual/installation/standalone.md +++ b/docs/manual/installation/standalone.md @@ -14,14 +14,14 @@ 2. Add the appropriate Home Manager channel. If you are following 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 --update ``` 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 --update ``` @@ -29,7 +29,7 @@ 3. Run the Home Manager installation command and create the first Home Manager generation: - ``` console + ``` shell $ nix-shell '' -A install ``` diff --git a/docs/manual/nix-flakes/nix-darwin.md b/docs/manual/nix-flakes/nix-darwin.md index 2ad1cc34..133d9179 100644 --- a/docs/manual/nix-flakes/nix-darwin.md +++ b/docs/manual/nix-flakes/nix-darwin.md @@ -42,6 +42,6 @@ command here may be `darwin-rebuild switch --flake `. 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 ``` diff --git a/docs/manual/nix-flakes/nixos.md b/docs/manual/nix-flakes/nixos.md index 485dc762..71a3e33c 100644 --- a/docs/manual/nix-flakes/nixos.md +++ b/docs/manual/nix-flakes/nixos.md @@ -42,6 +42,6 @@ command for the system, such as 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 ``` diff --git a/docs/manual/nix-flakes/prerequisites.md b/docs/manual/nix-flakes/prerequisites.md index 1b8835d8..fa48ce85 100644 --- a/docs/manual/nix-flakes/prerequisites.md +++ b/docs/manual/nix-flakes/prerequisites.md @@ -29,7 +29,7 @@ - Alternatively, you can enable flakes on a per-command basis with the following additional flags to `nix` and `home-manager`: - ``` console + ``` shell $ nix --extra-experimental-features "nix-command flakes" $ home-manager --extra-experimental-features "nix-command flakes" ``` diff --git a/docs/manual/nix-flakes/standalone.md b/docs/manual/nix-flakes/standalone.md index 57ebbb7f..428f29bc 100644 --- a/docs/manual/nix-flakes/standalone.md +++ b/docs/manual/nix-flakes/standalone.md @@ -7,13 +7,13 @@ flake. For example, if you are using the unstable version of Nixpkgs or NixOS, then to generate and activate a basic configuration run the command -``` console +``` shell $ nix run home-manager/master -- init --switch ``` For Nixpkgs or NixOS version 23.11 run -``` console +``` shell $ 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 activating it. -``` console +``` shell $ nix run home-manager/$branch -- init $ # Edit files in ~/.config/home-manager $ 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 and activating your flake-based configuration is as simple as -``` console +``` shell $ home-manager switch ``` It is possible to override the default configuration directory, if you want. For example, -``` console +``` shell $ nix run home-manager/$branch -- init --switch ~/hmconf $ # And after the initial activation. $ home-manager switch --flake ~/hmconf diff --git a/docs/manual/usage.md b/docs/manual/usage.md index b19147be..2a569aaf 100644 --- a/docs/manual/usage.md +++ b/docs/manual/usage.md @@ -30,7 +30,7 @@ programs.emacs.enable = "yes"; then building it, for example using `home-manager build`, will result in an error message saying something like -``` console +```console $ home-manager build error: A definition for option `programs.emacs.enable' is not of type `boolean'. Definition values: - 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 [Home Manager Configuration Options](#ch-options) or directly in the terminal by running -``` console +``` shell man home-configuration.nix ``` diff --git a/docs/manual/usage/configuration.md b/docs/manual/usage/configuration.md index 0ba484cf..a7c1d5a2 100644 --- a/docs/manual/usage/configuration.md +++ b/docs/manual/usage/configuration.md @@ -98,13 +98,13 @@ follows: To activate this configuration you can run -``` console +``` shell home-manager switch ``` or if you are not feeling so lucky, -``` console +``` shell home-manager build ``` diff --git a/docs/manual/usage/dotfiles.md b/docs/manual/usage/dotfiles.md index 67642099..5ffedd93 100644 --- a/docs/manual/usage/dotfiles.md +++ b/docs/manual/usage/dotfiles.md @@ -27,7 +27,7 @@ For example, suppose you have a wonderful, painstakingly created to your configuration. Attempting to switch to the generation will then result in -``` console +``` shell $ home-manager switch … Activating checkLinkTargets diff --git a/docs/manual/usage/rollbacks.md b/docs/manual/usage/rollbacks.md index 01dc35ed..5b5180f9 100644 --- a/docs/manual/usage/rollbacks.md +++ b/docs/manual/usage/rollbacks.md @@ -7,7 +7,7 @@ do so are 1. Run `home-manager generations` to determine which generation you wish to rollback to: - ``` console + ``` shell $ home-manager generations 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 @@ -25,7 +25,7 @@ do so are 3. Run the `activate` script inside the copied store path: - ``` console + ``` shell $ /nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation/activate Starting home manager activation … diff --git a/docs/manual/usage/updating.md b/docs/manual/usage/updating.md index 9ea39693..c9d96296 100644 --- a/docs/manual/usage/updating.md +++ b/docs/manual/usage/updating.md @@ -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 then switch to the updated Home Manager environment. -``` console +``` shell $ nix-channel --update … unpacking channels...