Hi all,
I’ve been running nixos for a few years but have only recently started using containers within nix, so wondering if this is a frequently encountered “oh you should just do X” situation, or if it’s worth raising an issue.
I have a container that is currently pinned to 26.05 (for less churn and breakage), but the host running it follows nixos-unstable.
The container seems to have been broken by nixos/nix: Support local-only store by pkpbynum · Pull Request #536721 · NixOS/nixpkgs · GitHub – specifically, system evaluation now unconditionally evaluates config.nix.daemon, but this attribute doesn’t exist on 26.05:
error: attribute 'daemon' missing
at «github:nixos/nixpkgs/8ce4ef6cb6f871616146b9fe26d2a5ae594e94fe?narHash=sha256-xB8mKMOx1IA9vTDNLmJZ6n4wCMq/cuWBBOzGCRnqxrU%3D»/nixos/modules/virtualisation/nixos-containers.nix:1004:50:
1003| ++
1004| optional (cfg.config.nix.enable && cfg.config.nix.daemon.enable && !config.nix.daemon.enable)
| ^
1005| "${options.containers}.${strings.escapeNixIdentifier name} requires a Nix daemon but the host does not provided it, as option ${options.nix.daemon.enable} is disabled";
I assume the most reasonable workaround is for me to import a module declaring this option until 26.11 is released and I can then migrate the container to follow that.
Is my workaround the best approach? Or is it conventional that some kind of compatibility shim be introduced upstream that wasn’t done in this case? Happy to work on a PR if the latter.