Creating a NixOS live CD: Difference between revisions
imported>Mic92 No edit summary |
imported>Mic92 |
||
| Line 10: | Line 10: | ||
Create a file "iso.nix": | Create a file "iso.nix": | ||
<syntaxhighlight lang="nix"> | |||
# This module defines a small NixOS installation CD. It does not | |||
# contain any graphical stuff. | |||
{config, pkgs, ...}: | |||
{ | |||
imports = [ | |||
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix> | |||
# Provide an initial copy of the NixOS channel so that the user | |||
# doesn't need to run "nix-channel --update" first. | |||
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix> | |||
]; | |||
} | |||
</syntaxhighlight> | |||
Build the image via: | Build the image via: | ||
<syntaxhighlight lang="bash"> | |||
nix-build -A config.system.build.isoImage -I nixos-config=iso.nix /path/to/nixpkgs/nixos | |||
</syntaxhighlight> | |||
=== Start SSH with your SSH key === | === Start SSH with your SSH key === | ||