| 19 Aug 2023 |
| @khalilsantana:matrix.org joined the room. | 03:03:26 |
| @khalilsantana:matrix.org left the room. | 03:03:52 |
| @khalilsantana:matrix.org joined the room. | 03:04:13 |
@khalilsantana:matrix.org | Hi, is there a proper way to get colmena to nixos-rebuild --upgrade multiple hosts? I can use the exec sub-command but AFAIK that will build in every node, which seems wasteful | 03:06:51 |
Wanja Hentze | wait, are you using channels on the hosts? | 08:30:26 |
@khalilsantana:matrix.org | Doesn't all nixos installs use channels? (I'm a newbie, so I just looked up at the manual on how to upgrade nixos and that was one of the ways listed) | 13:10:05 |
Wanja Hentze | No, I've never seen them used with colmena | 13:16:06 |
Wanja Hentze | colmena evaluates the entire configuration not on the hosts but on the deploying machine | 13:16:40 |
Wanja Hentze | you would usually pin your nixpkgs revision etc. either via flakes or some other mechanism | 13:17:03 |
Wanja Hentze | I think it might still work if you use <nixpkgs> somewhere but it would use the channels of the deploying host, not the deployed host | 13:17:51 |
@khalilsantana:matrix.org | I'm not using flakes as of yet, trying to keep it as simple as possible so I can actually understand it | 13:17:53 |
Wanja Hentze | me neither btw | 13:18:05 |
Wanja Hentze | we just have a JSON file with the git revs and such | 13:18:21 |
Wanja Hentze | using nix-prefetch-git to pin nixpkgs | 13:18:38 |
Wanja Hentze | very low-tech but works perfectly | 13:18:49 |
@khalilsantana:matrix.org | hum, understood. Is there a way to at least share built packages between hosts? | 13:18:56 |
@khalilsantana:matrix.org | Like some sort of "host <x> built this and stored it in <central_server>", then "host <y> fetches from <central_server> before building packages" | 13:20:17 |
@khalilsantana:matrix.org | Hum, there's a binary cache wiki page | 13:21:55 |
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 |