Replies: 1 comment
-
|
There is an open PR that’s trying to implement this: #94 But in general, it is not straightforward because it interacts with a Nix feature called IFD (import from derivation). https://nix.dev/manual/nix/2.26/language/import-from-derivation |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
New to nix and compose2nix in general, and really interested in using compose2nix to manage a bunch of services.
My goal is to have docker-compose.yml be the file that's committed, and have nix run compose2nix to generate the output when building the system. I tried this:
compose2nix.nix:
docker.nix:
However this proves difficult to get working (maybe because I'm using flakes to manage the system config?), giving me and infinite recursion error:
I think I understand this - nix cannot resolve the imports because to do that it needs
pkgs(or config?), which needs to resolve the imports to determine.I think chatgpt initially lead me astray - is something like this possible? I'm trying to have a simple and 'pure' workflow where the thing I author is the docker-compose.yml file, and then the nix version of it is automatically generated from there.
Beta Was this translation helpful? Give feedback.
All reactions