Creating a NixOS live CD: Difference between revisions

imported>Onny
Add nix flakes example
imported>Onny
mNo edit summary
Line 7: Line 7:
== Building ==
== Building ==


Building minimal NixOS installation CD with the <code>nix-build</code> command. In this example with [[Neovim]] preinstalled.  
Building minimal NixOS installation CD with the <code>nix-build</code> command by creating this <code>iso.nix</code>-file. In this example with [[Neovim]] preinstalled.  


{{file|iso.nix|nix|<nowiki>
<syntaxhighlight lang="nix">
{ config, pkgs, ... }:
{ config, pkgs, ... }:
{
{
Line 21: Line 21:
   environment.systemPackages = [ pkgs.neovim ];
   environment.systemPackages = [ pkgs.neovim ];
}
}
</nowiki>}}
</syntaxhighlight>


Build the image via:
Build the image via: