erikarvstedt / extra-container

Run declarative NixOS containers without full system rebuilds

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation note

deliciouslytyped opened this issue · comments

If you run into errors like "option service.dnsmasq does not exist", or when you try to import module-list.nix to alleviate that, because surely it will help, even though you're suspicious that something is very wrong, and then get errors like:

The option `ids.gids' in `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/misc/ids.nix' is a prefix of options in `<unknown-file>'.

The actual problem is that you imported your .nix at the top level instead of in config.

E.g. this is wrong:

{
  imports = [ ./myservice.nix ];
  containers.whatever = {
    config = {
      };
    };
}

This is right:


{
  containers.whatever = {
    config = {
      imports = [ ./myservice.nix ];
      };
    };
}

Nothing wrong with extra-container here, I just wasn't paying attention. :)