erikarvstedt / extra-container

Run declarative NixOS containers without full system rebuilds
MIT License
218 stars 16 forks source link

Build fails if container config imports another file #11

Closed DavHau closed 4 years ago

DavHau commented 4 years ago

If I quickly want to test an existing configuration.nix inside a container, my way to go would be:

{
  containers.demo = {
    privateNetwork = true;
    hostAddress = "10.250.0.1";
    localAddress = "10.250.0.2";

    config = import ./configuration.nix;
  };
}

But this is not possible. It fails because it tries to load ./configuration.nix from a temporary directory.

DavHau commented 4 years ago

The error only occurred because i piped the config into the tool. Referencing the configuration file via cmdline argument works