[Nix-dev] Creating offline installation image

James Cook james.cook at utoronto.ca
Sat Mar 28 05:46:32 CET 2015


On 23 March 2015 at 06:51, Arseniy Seroka <ars.seroka at gmail.com> wrote:
> Hello!
> I'm trying to create an iso, that I can use to install nixos without
> internet access.
> I've created config [1] for iso creation. So I'm creating iso, booting with
> it and after that I'm copying this config to my new machine. Of course I'm
> editing it be right configuration for my new machine (boot, imports etc).
> But I'm not additing any new pkgs.
> So when I do nixos-install, it copes lot's of drv to store, but fails.
> It fails because it tries to download patch for pulseaudio as a dependence
> for vlc! (which is already included to image, no? [2]).
> So, how to properly create and offline nixos iso with all deps and neccesary
> files?
>
> [1]
> { config, pkgs, ... }:
>
> {
>   imports =
>     [ ./installation-cd-base.nix
>       ../../profiles/minimal.nix
>     ];
>
>   isoImage.includeSystemBuildDependencies = true;
>
>   users.extraUsers.lcd = {
>      ........
>   };
>
>   time.timeZone = "Europe/Moscow";
>
>   networking = {
>     hostName = "foobar";
>     wireless.enable = false;
>     networkmanager.enable = true;
>     networkmanager.packages = with pkgs;
>     [ networkmanager_pptp
>       gnome3_12.networkmanager_pptp
>     ];
>   };
>
>   services = {
>     openssh.enable = true;
>     dbus.enable = true;
>   };
>
>   services.xserver = {
>     enable              = true;
>     desktopManager.default = "none";
>     windowManager.openbox.enable = true;
>   };
>
>   environment.systemPackages = with pkgs; [
>    mc
>    wget
>    zsh
>    vlc # [2]
>    networkmanager
>    networkmanagerapplet
>    networkmanager_pptp
>    gnome3_12.networkmanager_pptp
>    openbox
>    fontconfig
>   ];
>   nixpkgs.config.allowUnfree = true;
>
>   fonts = {
>     fontconfig.enable = true;
>   };
>
> }
>
> --
> Sincerely,
> Arseniy Seroka

That's strange. Did you make any progress? It might be helpful to file
a bug; it would be nice if offline installation worked.

I don't know what causes this, but two  ideas for debugging:
- Verify that the iso image has a vlc output under /nix/store.
- If yes, I guess that means the installation tries to install a
slightly different version of VLC. So try to figure out why... what
exactly are you changing in configuration.nix? What happens if you try
the installation without changing anything?

A lot of this is probably time-consuming; sorry about that. It might
speed things up to install on a VM.

James


More information about the nix-dev mailing list