docs(web): replace console with bash

This gives us a cute "Terminal Window Look" for these code blocks.

Change-Id: I87fbb739917cef692c692585e7ff569d3da66435
Reviewed-on: https://cl.snix.dev/c/snix/+/30449
Reviewed-by: Vova Kryachko <v.kryachko@gmail.com>
Tested-by: besadii
Autosubmit: Florian Klink <flokli@flokli.de>
This commit is contained in:
Florian Klink 2025-05-04 19:44:32 +03:00 committed by clbot
parent 21628f7ad4
commit 8b04f098da
3 changed files with 34 additions and 35 deletions

View file

@ -29,13 +29,13 @@ Snix is hosted in its own Forgejo instance, hosted on [git.snix.dev](https://git
Check out the source code as follows: Check out the source code as follows:
```console ```bash
$ git clone https://git.snix.dev/snix/snix.git git clone https://git.snix.dev/snix/snix.git
``` ```
### Interactive development ### Interactive development
```console ```bash
$ direnv allow direnv allow
``` ```
This provides all the necessary tools and dependencies to interactively build This provides all the necessary tools and dependencies to interactively build
@ -47,14 +47,14 @@ It is also possible to build the different Snix crates with Nix,
in which you don't need to enter the shell. in which you don't need to enter the shell.
From the root of the repository, you can build as follows: From the root of the repository, you can build as follows:
```console ```bash
$ nix-build -A snix.cli $ nix-build -A snix.cli
``` ```
Alternatively, you can use the `mg` wrapper from anywhere in the repository (requires the direnv setup from above): Alternatively, you can use the `mg` wrapper from anywhere in the repository (requires the direnv setup from above):
```console ```bash
$ mg build //snix:cli mg build //snix:cli
``` ```
This uses [crate2nix][] to build each crate dependency individually. This uses [crate2nix][] to build each crate dependency individually.

View file

@ -42,14 +42,14 @@ interact with Gerrit directly.
Replace `$USER` with your `Username` shown in the Gerrit settings. Replace `$USER` with your `Username` shown in the Gerrit settings.
#### If using SSH authentication: #### If using SSH authentication:
```console ```bash
$ git remote set-url origin "ssh://$USER@cl.snix.dev:29418/snix" git remote set-url origin "ssh://$USER@cl.snix.dev:29418/snix"
``` ```
#### If using HTTP authentication: #### If using HTTP authentication:
```console ```bash
$ git remote set-url origin "https://$USER@cl.snix.dev/a/snix" git remote set-url origin "https://$USER@cl.snix.dev/a/snix"
``` ```
<!-- TODO: fix replication to include refs/changes/… etc, and ensure it <!-- TODO: fix replication to include refs/changes/… etc, and ensure it
@ -62,10 +62,10 @@ updates of old commits, and track them as new revisions of the same "CL" [^2].
To install the commit-msg hook, run the following from the repo root: To install the commit-msg hook, run the following from the repo root:
```console ```bash
$ mkdir -p .git/hooks mkdir -p .git/hooks
$ curl -Lo .git/hooks/commit-msg https://cl.snix.dev/tools/hooks/commit-msg curl -Lo .git/hooks/commit-msg https://cl.snix.dev/tools/hooks/commit-msg
$ chmod +x .git/hooks/commit-msg chmod +x .git/hooks/commit-msg
``` ```
{{< callout context="tip" title="Did you know?" icon="outline/rocket" >}} {{< callout context="tip" title="Did you know?" icon="outline/rocket" >}}
@ -78,8 +78,8 @@ If you already have some local commits without `Change-Id` field, `git commit
### Push your changes ### Push your changes
Do some local changes, and push them to Gerrit as follows: Do some local changes, and push them to Gerrit as follows:
```console ```bash
$ git push origin HEAD:refs/for/canon git push origin HEAD:refs/for/canon
``` ```
Gerrit will print links to newly created CLs to your terminal. Gerrit will print links to newly created CLs to your terminal.
@ -109,8 +109,8 @@ Some more tips:
You can immediately assign reviewers and other fields while pushing a You can immediately assign reviewers and other fields while pushing a
new/updated change, by adding it to the push URL. new/updated change, by adding it to the push URL.
```console ```bash
$ git push origin HEAD:refs/for/canon%r=alice,cc=bob,l=Autosubmit+1,publish-comments git push origin HEAD:refs/for/canon%r=alice,cc=bob,l=Autosubmit+1,publish-comments
``` ```
* will set `alice` as a reviewer * will set `alice` as a reviewer
* will set `bob` as CC * will set `bob` as CC

View file

@ -18,9 +18,8 @@ This document describes how to configure `snix` as the lower layer in your
To use this feature you will need to 2 `snix` compontents, for detailed building To use this feature you will need to 2 `snix` compontents, for detailed building
instructions see [Building]({{< ref "building" >}}). instructions see [Building]({{< ref "building" >}}).
```console ```bash
$ nix-build -A snix.store nix-build -A snix.store -A snix.nix-daemon
$ nix-build -A snix.nix-daemon
``` ```
These will provide `snix-store` and `nix-daemon` binaries. These will provide `snix-store` and `nix-daemon` binaries.
@ -35,8 +34,8 @@ customization instructions.
You can run the daemon with: You can run the daemon with:
```console ```bash
$ $(nix-build -A snix.snix-store)/bin/snix-store daemon $(nix-build -A snix.snix-store)/bin/snix-store daemon
``` ```
### Mount the store ### Mount the store
@ -44,8 +43,8 @@ $ $(nix-build -A snix.snix-store)/bin/snix-store daemon
To expose the store paths and their contents as a file system, if can be To expose the store paths and their contents as a file system, if can be
FUSE-mounted with the following command: FUSE-mounted with the following command:
```console ```bash
$ $(nix-build -A snix.snix-store)/bin/snix-store mount /path/to/mount $(nix-build -A snix.snix-store)/bin/snix-store mount /path/to/mount
``` ```
This mount will talk to the previously invoked daemon. This mount will talk to the previously invoked daemon.
@ -56,8 +55,8 @@ be careful with it if your store is really large.
### Run `snix` nix-daemon ### Run `snix` nix-daemon
```console ```bash
$ $(nix-build -A snix.nix-daemon)/bin/nix-daemon -l /tmp/snix-daemon.sock \ $(nix-build -A snix.nix-daemon)/bin/nix-daemon -l /tmp/snix-daemon.sock \
--unix-listen-unlink --unix-listen-unlink
``` ```
@ -84,15 +83,15 @@ Bind mount your real /nix store on the side, so that nix has direct access to
it, this is optional but allows you to have access to your real nix store it, this is optional but allows you to have access to your real nix store
without unmounting: without unmounting:
```console ```bash
$ mount --bind /nix /opt/nix mount --bind /nix /opt/nix
``` ```
```console ```bash
$ mount -t overlay overlay \ mount -t overlay overlay \
-o lowerdir=/path/to/mount \ -o lowerdir=/path/to/mount \
-o upperdir=/opt/nix \ -o upperdir=/opt/nix \
/nix /nix
``` ```
### Configure nix to use the daemon ### Configure nix to use the daemon