admin: runner-installation: update NixOS instructions (#998)

Preview: https://forgejo.codeberg.page/@docs_pull_998/docs/next/admin/runner-installation/#nixos

Fixes #903.

As described in that issue, the Nix package has been renamed upstream, as well as that the mentioned service module does not exist in reality.
I reworked that section to bring everything up-to-date. The mentioned labels pre-population does not apply to Forgejo, at least.  I have also added a small example as reference.

Further, I included a small change to `scripts/preview.sh`, to detect the actual URL open command - on Linux, `xdg-open` is normally the canonical one.

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/998
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Christoph Heiss <christoph@c8h4.io>
Co-committed-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss 2025-01-05 09:51:32 +00:00 committed by Earl Warren
parent 2da0c137a6
commit 2bb951215c
2 changed files with 30 additions and 3 deletions

View file

@ -1,5 +1,11 @@
#!/usr/bin/env sh
if hash xdg-open 2>/dev/null; then
open_cmd=xdg-open
else
open_cmd=open
fi
current_branch=$(git branch --show-current)
repo_path=$(pwd)
@ -32,7 +38,7 @@ mkdir -p $(dirname ./src/content/images/$current_branch) # in case of branch na
ln -s $repo_path/images/ ./public/images/$current_branch
# once the dev server is running, open the current docs branch in the browser
sleep 3 && open http://localhost:4321/docs/$current_branch/ &
sleep 3 && $open_cmd http://localhost:4321/docs/$current_branch/ &
# start the dev server
pnpm run dev