| 19 Aug 2023 |
Wanja Hentze | In reply to @khalilsantana:matrix.org Like some sort of "host built this and stored it in <central_server>", then "host fetches from <central_server> before building packages" idk I don't use remote builders | 16:22:35 |
Wanja Hentze | it all builds on the deploying host, not the deployed host | 16:22:46 |
Wanja Hentze | which is a beefy CI machine in this case | 16:23:07 |
Wanja Hentze | maybe you're confused because you're used to running nixos-rebuild on the hosts | 16:26:04 |
Wanja Hentze | colmena by default builds locally and then pushes to the remote hosts | 16:26:17 |
Wanja Hentze | so in that sense you're automatically sharing built things as long as you're deploying several hosts from the same local host | 16:26:42 |
@khalilsantana:matrix.org | But I mean, say if I add some new package to my config.nix, that will be built locally (deployment machine) and then the artefacts copied to the remote targets. But can I somehow fetch whatever package upgrades needed for existing hosts, build them once and share them across hosts using colmena (I seems like no?) | 19:16:04 |
Wanja Hentze | (I don't understand the question but maybe somebody else does) | 19:21:37 |
Zhaofeng Li | In reply to @khalilsantana:matrix.org But I mean, say if I add some new package to my config.nix, that will be built locally (deployment machine) and then the artefacts copied to the remote targets. But can I somehow fetch whatever package upgrades needed for existing hosts, build them once and share them across hosts using colmena (I seems like no?) This is what currently happens. When you deploy a new config, Colmena won't copy paths that already exist on the remote host. | 19:24:38 |
Zhaofeng Li | For example, you edit networking.hostName, the new system profile closure is mostly identical to the old one except for a few paths | 19:25:59 |
Zhaofeng Li | * For example, when you only edit networking.hostName, the new system profile closure is mostly identical to the old one except for a few paths | 19:26:11 |
Zhaofeng Li | The same applies to just adding new packages. Or are you asking about something else? | 19:26:55 |
@khalilsantana:matrix.org | My question is centered around package versions rather than anything else. Say all my hosts have foo-bar-v1.0, then at a later point the nixos-channel provides foo-bar-v2.0, since the config.nix didn't change I don't think colmena will fetch & apply the new binaries to the remote hosts, correct? | 19:29:07 |
@khalilsantana:matrix.org | Or does a colmena apply also applies package upgrades, not only installs/uninstalls? | 19:29:50 |
Zhaofeng Li | Nix works fundamentally differently from other package managers. The package versions are decided when you evaluate the expression, and for Colmena everything is evaluated locally on the host you are deploying from | 19:31:33 |