From d547493e0c58e10959a53918dd1b7235216dabda Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sat, 22 May 2021 19:08:27 -0700 Subject: [PATCH] Revert "nixos/doc: add md-to-db.sh, convert "Building Your Own NixOS CD" to CommonMark" This reverts commit 6c14851943fe55da9df88a502d1e1fe2271d9666. --- .github/workflows/nixos-manual.yml | 20 ----------- .../development/building-nixos.chapter.md | 18 ---------- .../doc/manual/development/building-nixos.xml | 33 +++++++++++++++++++ nixos/doc/manual/development/development.xml | 2 +- nixos/doc/manual/from_md/README.md | 5 --- .../development/building-nixos.chapter.xml | 33 ------------------- nixos/doc/manual/md-to-db.sh | 32 ------------------ 7 files changed, 34 insertions(+), 109 deletions(-) delete mode 100644 .github/workflows/nixos-manual.yml delete mode 100644 nixos/doc/manual/development/building-nixos.chapter.md create mode 100644 nixos/doc/manual/development/building-nixos.xml delete mode 100644 nixos/doc/manual/from_md/README.md delete mode 100644 nixos/doc/manual/from_md/development/building-nixos.chapter.xml delete mode 100755 nixos/doc/manual/md-to-db.sh diff --git a/.github/workflows/nixos-manual.yml b/.github/workflows/nixos-manual.yml deleted file mode 100644 index 101cd3906be..00000000000 --- a/.github/workflows/nixos-manual.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: NixOS manual checks - -on: - pull_request: - branches-ignore: - - 'release-**' - paths: - - 'nixos/**/*.xml' - - 'nixos/**/*.md' - -jobs: - tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: cachix/install-nix-action@v12 - - name: Check DocBook files generated from Markdown are consistent - run: | - nixos/doc/manual/md-to-db.sh - git diff --exit-code diff --git a/nixos/doc/manual/development/building-nixos.chapter.md b/nixos/doc/manual/development/building-nixos.chapter.md deleted file mode 100644 index 699a75f4115..00000000000 --- a/nixos/doc/manual/development/building-nixos.chapter.md +++ /dev/null @@ -1,18 +0,0 @@ -# Building Your Own NixOS CD {#sec-building-cd} -Building a NixOS CD is as easy as configuring your own computer. The idea is to use another module which will replace your `configuration.nix` to configure the system that would be installed on the CD. - -Default CD/DVD configurations are available inside `nixos/modules/installer/cd-dvd` - -```ShellSession -$ git clone https://github.com/NixOS/nixpkgs.git -$ cd nixpkgs/nixos -$ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix default.nix -``` - -Before burning your CD/DVD, you can check the content of the image by mounting anywhere like suggested by the following command: - -```ShellSession -# mount -o loop -t iso9660 ./result/iso/cd.iso /mnt/iso -``` - -If you want to customize your NixOS CD in more detail, or generate other kinds of images, you might want to check out [nixos-generators](https://github.com/nix-community/nixos-generators). This can also be a good starting point when you want to use Nix to build a 'minimal' image that doesn't include a NixOS installation. diff --git a/nixos/doc/manual/development/building-nixos.xml b/nixos/doc/manual/development/building-nixos.xml new file mode 100644 index 00000000000..d58b6354d1d --- /dev/null +++ b/nixos/doc/manual/development/building-nixos.xml @@ -0,0 +1,33 @@ + + Building Your Own NixOS CD + + Building a NixOS CD is as easy as configuring your own computer. The idea is + to use another module which will replace your + configuration.nix to configure the system that would be + installed on the CD. + + + Default CD/DVD configurations are available inside + nixos/modules/installer/cd-dvd. + +$ git clone https://github.com/NixOS/nixpkgs.git +$ cd nixpkgs/nixos +$ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix default.nix + + + Before burning your CD/DVD, you can check the content of the image by + mounting anywhere like suggested by the following command: + +# mount -o loop -t iso9660 ./result/iso/cd.iso /mnt/iso + + + If you want to customize your NixOS CD in more detail, or generate other kinds + of images, you might want to check out nixos-generators. This can also be a good starting point when you want to use Nix to build a + 'minimal' image that doesn't include a NixOS installation. + + diff --git a/nixos/doc/manual/development/development.xml b/nixos/doc/manual/development/development.xml index 78763a73505..43f511b3e96 100644 --- a/nixos/doc/manual/development/development.xml +++ b/nixos/doc/manual/development/development.xml @@ -13,7 +13,7 @@ - + diff --git a/nixos/doc/manual/from_md/README.md b/nixos/doc/manual/from_md/README.md deleted file mode 100644 index cc6d08ca0a1..00000000000 --- a/nixos/doc/manual/from_md/README.md +++ /dev/null @@ -1,5 +0,0 @@ -This directory is temporarily needed while we transition the manual to CommonMark. It stores the output of the ../md-to-db.sh script that converts CommonMark files back to DocBook. - -We are choosing to convert the Markdown to DocBook at authoring time instead of manual building time, because we do not want the pandoc toolchain to become part of the NixOS closure. - -Do not edit the DocBook files inside this directory or its subdirectories. Instead, edit the corresponding .md file in the normal manual directories, and run ../md-to-db.sh to update the file here. diff --git a/nixos/doc/manual/from_md/development/building-nixos.chapter.xml b/nixos/doc/manual/from_md/development/building-nixos.chapter.xml deleted file mode 100644 index ceb744447da..00000000000 --- a/nixos/doc/manual/from_md/development/building-nixos.chapter.xml +++ /dev/null @@ -1,33 +0,0 @@ - - Building Your Own NixOS CD - - Building a NixOS CD is as easy as configuring your own computer. The - idea is to use another module which will replace your - configuration.nix to configure the system that - would be installed on the CD. - - - Default CD/DVD configurations are available inside - nixos/modules/installer/cd-dvd - - -$ git clone https://github.com/NixOS/nixpkgs.git -$ cd nixpkgs/nixos -$ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix default.nix - - - Before burning your CD/DVD, you can check the content of the image - by mounting anywhere like suggested by the following command: - - -# mount -o loop -t iso9660 ./result/iso/cd.iso /mnt/iso</screen> - - - If you want to customize your NixOS CD in more detail, or generate - other kinds of images, you might want to check out - nixos-generators. - This can also be a good starting point when you want to use Nix to - build a minimal image that doesn’t include a NixOS - installation. - - diff --git a/nixos/doc/manual/md-to-db.sh b/nixos/doc/manual/md-to-db.sh deleted file mode 100755 index a29d981d457..00000000000 --- a/nixos/doc/manual/md-to-db.sh +++ /dev/null @@ -1,32 +0,0 @@ -#! /usr/bin/env nix-shell -#! nix-shell -I nixpkgs=channel:nixpkgs-unstable -i bash -p pandoc - -# This script is temporarily needed while we transition the manual to -# CommonMark. It converts the .md files in the regular manual folder -# into DocBook files in the from_md folder. - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -pushd $DIR - -OUT="$DIR/from_md" -mapfile -t MD_FILES < <(find . -type f -regex '.*\.md$') - -for mf in ${MD_FILES[*]}; do - mkdir -p $(dirname "$OUT/$mf") - if [ "${mf: -11}" == ".section.md" ]; then - pandoc "$mf" -t docbook \ - --extract-media=media \ - -f markdown+smart \ - | cat > "$OUT/${mf%".section.md"}.section.xml" - fi - - if [ "${mf: -11}" == ".chapter.md" ]; then - pandoc "$mf" -t docbook \ - --top-level-division=chapter \ - --extract-media=media \ - -f markdown+smart \ - | cat > "$OUT/${mf%".chapter.md"}.chapter.xml" - fi -done - -popd