| 27 Jan 2022 |
@janejasperous:one.ems.host | * I was trying to achieve build .#colmena.$host and .#nixosConfiguration.$host using exactly same definition. But colmena doesnt like "modules" option. If i change "modules" by "imports" then colmena is ok, but nixos-rebuild ask for "modules" definition. | 15:31:57 |
@janejasperous:one.ems.host | Finally, after try some deployments using colmena Im happy enough to get rid of nixosConfigurations output :) | 15:33:05 |
@phaer:matrix.org | Jane Jasperous: Does this work for you?
colmena.my-host = { name, nodes, ... }:
{
imports = [ self.nixosConfigurations.my-host ];
};
(if you get an error that deployment options are undefined, import colmena.nixosModules.deploymentOptions in your nixosConfiguration)
| 17:38:03 |
| 28 Jan 2022 |
@github:maunium.net | [zhaofengli/colmena] zhaofengli opened
pull request
#51: eval.nix: Add "${name}-key.service" units for keys
Fixes #48.
| 02:55:16 |
| fpletz joined the room. | 15:59:39 |
Willi Butz | 🎉 | 16:00:12 |
| 31 Jan 2022 |
@github:maunium.net | [zhaofengli/colmena] zhaofengli closed
issue
#50: Nixpkgs fails to build on unstable
| 19:34:49 |
| 1 Feb 2022 |
@github:maunium.net | [zhaofengli/colmena] lheckemann opened
issue
#52: Excessive output when terminal isn't tall enough
When too many lines of progress indication are being printed, scrollback will explode. It looks mostly fine if you're not scrolling back:
but if you make the terminal taller or scroll up, you'll see a problem:
This can drown out valuable output from the build phase or similar.
A simple way to reproduce this is to run colmena apply keys with the following hive.nix, in a terminal less than 20 lines tall:
with import <nixpkgs> {};
lib.genAttrs (map (n: "host${toString n}") (lib.range 1 20)) (name: {
deployment.targetHost = "dummy.invalid";
boot.isContainer = true;
deployment.keys.block-deployment = {
keyCommand = ["sleep" "infinity"];
};
})
| 07:28:06 |
@github:maunium.net | [zhaofengli/colmena] lheckemann opened
issue
#53: Cannot deploy to a host without internet
If for some reason the deployment target doesn't have an internet connection but does have binary caches enabled, copying the system closure will fail rather than falling back to copying directly.
| 20:08:07 |
| 3 Feb 2022 |
| @schnecfk:ruhr-uni-bochum.de joined the room. | 00:13:20 |
@schnecfk:ruhr-uni-bochum.de | Is there a specific reason on why colmena diverges from the "standard" flake output schema? (For reference: https://nixos.wiki/wiki/Flakes#Output_schema ) | 02:06:21 |
@schnecfk:ruhr-uni-bochum.de | * Is there a specific reason for why colmena diverges from the "standard" flake output schema? (For reference: https://nixos.wiki/wiki/Flakes#Output_schema ) | 02:07:27 |
@buckley310:matrix.org | because colmena was created before flakes were stable | 02:07:42 |
@buckley310:matrix.org | (if i had to guess) | 02:07:49 |
@buckley310:matrix.org | colmena just got flakes support in June | 02:08:44 |
@schnecfk:ruhr-uni-bochum.de | In reply to @buckley310:matrix.org because colmena was created before flakes were stable At least the flakes series on tweag is older than the first commit of colmena and documents the output schema in a similar way | 02:10:20 |
@schnecfk:ruhr-uni-bochum.de | I am asking because I'm trying to move my config to flakes and have a hard time with home-manager+NUR. At the same time, I can't really use other people's flake configurations as it's not properly (?) using flakes (this here is in theory exactly what I need, but I can't apply it: https://discourse.nixos.org/t/importing-nur-home-manager-modules-in-nix-flakes/16457/2 ) | 02:12:02 |
@schnecfk:ruhr-uni-bochum.de | * I am asking because I'm trying to move my config to flakes and have a hard time with home-manager+NUR. At the same time, I can't really use other people's flake configurations as it's not properly (?) using flakes (this here is in theory exactly what I need down to the module I want to import, but I can't apply it: https://discourse.nixos.org/t/importing-nur-home-manager-modules-in-nix-flakes/16457/2 ) | 02:12:24 |
@buckley310:matrix.org | In reply to @buckley310:matrix.org So I'm curious. In my setup my servers all exist inside of my flake outputs.nixosConfigurations, and my outputs.colmena is just a stub that consumes nixosConfigurations and emits a colmena configuration. Is anyone else doing it this way, or just me? I really like the portability of keeping my hosts in nixosConfigurations see also | 02:12:29 |
@schnecfk:ruhr-uni-bochum.de | Matrix won't show the reply, but the raw message (View source) is readable. I'll dig it up in the history | 02:13:59 |
@buckley310:matrix.org | tldr, my hosts are in nixosConfigurations, and my colmena output just translates that | 02:15:19 |
@buckley310:matrix.org | because i already had a flake with my servers 🤔 | 02:15:31 |
@schnecfk:ruhr-uni-bochum.de | Found it | 02:15:34 |
@schnecfk:ruhr-uni-bochum.de | It looks perfect for me, as I also want another possible flake output (to generate sd images for my SBCs with the same config) | 02:16:16 |
@schnecfk:ruhr-uni-bochum.de | Thanks, that's really useful 🙂 | 02:16:22 |
Zhaofeng Li | In reply to @schnecfk:ruhr-uni-bochum.de Is there a specific reason for why colmena diverges from the "standard" flake output schema? (For reference: https://nixos.wiki/wiki/Flakes#Output_schema ) It's because Colmena needs to inject its own modules for deployment.* options as well as module arguments (nodes, name). This is also consistent with the way NixOps implements its flakes support (outputs.nixopsConfigurations). | 02:16:35 |
Zhaofeng Li | It also provides a clear upgrade path for users using legacy hive.nix to flakes | 02:17:13 |
@schnecfk:ruhr-uni-bochum.de | Oh, that explains a lot. In that case, it might be great to document the shim-method that Buckley posted, as it should give "the best of both worlds" | 02:17:50 |
@buckley310:matrix.org | there has actually been an update since then as well, i have a custom module to store my deployment options, but you dont actually need that anymore, as the colmena flake exposes its modules as an output now | 02:18:27 |
Zhaofeng Li | In reply to @zhaofeng:zhaofeng.li It also provides a clear upgrade path for users using legacy hive.nix to flakes Also regarding upgrading to flakes, note that Colmena can auto-call if hive.nix evaluates to a function, allowing you to do things like this:
{ pkgs ? import <nixpkgs> { system = "x86_64-linux"; } }: # or how you pin your nixpkgs
{
meta = { ... };
}
and importing it like outputs.colmena = import ./hive.nix { pkgs = ...; }; in your flake. You can then deploy with either flake.nix and hive.nix during your transition period.
| 02:27:38 |