From 6c14851943fe55da9df88a502d1e1fe2271d9666 Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Tue, 22 Dec 2020 21:56:46 -0800 Subject: nixos/doc: add md-to-db.sh, convert "Building Your Own NixOS CD" to CommonMark --- nixos/doc/manual/development/building-nixos.chapter.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 nixos/doc/manual/development/building-nixos.chapter.md (limited to 'nixos/doc/manual/development/building-nixos.chapter.md') diff --git a/nixos/doc/manual/development/building-nixos.chapter.md b/nixos/doc/manual/development/building-nixos.chapter.md new file mode 100644 index 00000000000..699a75f4115 --- /dev/null +++ b/nixos/doc/manual/development/building-nixos.chapter.md @@ -0,0 +1,18 @@ +# 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. -- cgit 1.4.1