I realize this has been covered quite a bit, but I am still having difficulty fully grasping the nix language which means I still struggle sometimes to take an example and modify it to my needs.
Can someone please explain to me why the following doesn’t work (it complains that it expects a set but it is getting a function):
environment.etc."/containers/networks/podman1.json" = with pkgs.formats; {
source = json.generate "podman1.json" ({
name = "podman1";
id = "4b65a30030d96b0e930be01ec05b749ff36e2991b7a08c2877862561e945366a";
driver = "bridge";
network_interface = "podman1";
subnets = [
{
subnet = "10.89.0.0/24";
gateway = "10.89.0.1";
}
];
ipv6_enabled = false;
internal = false;
dns_enabled = true;
ipam_options = {
driver = "host-local";
};
});
};
Edit: I understand the bridge networking now, so I edited to clarify my question about the nix language.