| 2 Sep 2022 |
Yureka (she/her) | I mean it would be neat if I could also use --override-input etc. with colmena | 20:17:16 |
Zhaofeng Li | * Yeah, if the git repo is dirty, `nix flake metadata` will not return a locked flake URI (with the `narHash` query parameter) that's usable in pure evaluation mode. That's one gotcha I encountered when looking into pure eval. | 20:21:04 |
Yureka (she/her) | In reply to @linus:schreibt.jetzt
I'm currently doing a hack like
nixosConfigurations = lib.mapAttrs (name: config: let
nodeNixpkgs = self.outputs.colmena.meta.nodeNixpkgs.${name} or self.outputs.colmena.meta.nixpkgs;
nodeNixos = import (nodeNixpkgs.path + "/nixos/lib/eval-config.nix");
in nodeNixos {
modules = [
self.outputs.colmena.defaults
config
inputs.colmena.nixosModules.deploymentOptions
{
_module.args.name = name;
_module.args.nodes = self.outputs.nixosConfigurations;
nixpkgs.overlays = [ nodeNixpkgs.lib.flakeOverlay (import ./overlay.nix) ];
}
];
inherit (nodeNixpkgs) system;
}
) (builtins.removeAttrs self.outputs.colmena ["meta" "defaults"]);
to be able to get at least an approximation of the configs (enough to be able to build it in hydra, for example)
there is a way easier thing to do this | 20:48:11 |
Yureka (she/her) | that doesn't need any changes to colmena | 20:48:20 |
Yureka (she/her) |
nixosConfigurations = (import (inputs.colmena + "/src/nix/hive/eval.nix") {
rawFlake = self;
colmenaOptions = import (inputs.colmena + "/src/nix/hive/options.nix");
colmenaModules = import (inputs.colmena + "/src/nix/hive/modules.nix");
}).nodes;
| 20:48:36 |
Yureka (she/her) | * nixosConfigurations = (import (inputs.colmena + "/src/nix/hive/eval.nix") {
rawFlake = self;
colmenaOptions = import (inputs.colmena + "/src/nix/hive/options.nix");
colmenaModules = import (inputs.colmena + "/src/nix/hive/modules.nix");
}).nodes;
| 20:48:43 |
Yureka (she/her) | And now I don't actually mind that colmena magically adds these expressions, because I will just keep using the colmena binary pinned in my flake inputs, so I know that colmena uses the exact same hive expression as my nixosConfigurations shim | 20:49:34 |
Linux Hackerman | that is nicer. Thanks | 20:50:36 |
Yureka (she/her) | Can any of the evaluators take advantage of the eval cache? | 21:05:54 |
Linux Hackerman | the eval cache requires pure evaluation, so AFAIU no currently | 21:06:19 |
Linux Hackerman | but I might have missed something on the development of pure evaluation | 21:06:28 |
Linux Hackerman | if pure evaluation is working, it should use the eval cache as well | 21:06:46 |
Yureka (she/her) | colmena does use pure evaluation mode | 21:07:25 |
Yureka (she/her) | but nix-instantiate as entry point, not nix build | 21:07:41 |
Yureka (she/her) | nix-instantiate -E ... builtins.getFlake .... | 21:07:56 |
Yureka (she/her) | * nix-instantiate -E '... builtins.getFlake ....' | 21:08:02 |
Linux Hackerman | aah. I don't think so then. Not sure though. | 21:08:16 |
Yureka (she/her) | * nix-instantiate -E '... builtins.getFlake ....' --pure-eval. | 21:08:29 |
Yureka (she/her) | options.set_pure_eval(self.path.is_flake()); | 21:09:01 |
| 3 Sep 2022 |
David Arnold (blaggacao) | In reply to @zhaofeng:zhaofeng.li There still need to be some kind of versioning and/or a contract, because David Arnold (blaggacao) is making a framework (std) that will emit this structure with its own logic I'm totally fine with a pre-1.0 versioning for the time being (i.e. without special care). I'm pretty used to tracing and chasing upstream changes on a commit basis in the nix ecosystem. | 02:31:36 |
David Arnold (blaggacao) | In reply to @yuka:yuka.dev
In my flake, I now do:
outputs = { self, nixpkgs, colmena, ... }@inputs: {
colmenaEval = colmena.evalHive {
# whatever was in outputs.colmena before
};
nixosConfigurations = self.outputs.colmenaEval.nodes;
};
I'd do __colmena to be consumed by the CLI... Kind of alludes python's marking of an internal something | 02:34:16 |
David Arnold (blaggacao) | In reply to @yuka:yuka.dev Can any of the evaluators take advantage of the eval cache? The only thing on the horizon to make tooling CLI tooling better that itself depends on some sort of Eval output that I know of is numtide/nix-eval-cache. That's not really satisfying, thought. i'd support a builtin.evalCache key thing if that was proposed. | 02:38:43 |
| @lara:uwu.is joined the room. | 11:35:33 |
| Ronny left the room. | 12:06:11 |
| 4 Sep 2022 |
Yureka (she/her) | mini post advertising colmena and the --evaluator streaming option ;) | 10:42:02 |
Yureka (she/her) | https://fedi.yuka.dev/notice/ANDaPgyBU74xfpDd8C | 10:42:03 |
Yureka (she/her) | Redacted or Malformed Event | 13:17:37 |
| 5 Sep 2022 |
aanderse | i can't point colmena to a flake online yet, can i? like colmena apply --config github:aanderse/my-colmena-network/main | 19:28:10 |
aanderse | or maybe i just want to build that into my flake as an app... 🤔 | 19:28:52 |
Zhaofeng Li | In reply to @aanderse:nixos.dev i can't point colmena to a flake online yet, can i? like colmena apply --config github:aanderse/my-colmena-network/main I think you can, tried it and got a 404 error so it did try to fetch | 19:36:41 |