!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

294 Members
A simple, stateless NixOS deployment tool - https://github.com/zhaofengli/colmena101 Servers

Load older messages


SenderMessageTime
25 Jan 2022
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @linus.heckemann:matrix.mayflower.de
that is, if I use meta.nodeNixpkgs it will deploy using the nixpkgs I want it to, but have an incorrect version string
Hmm, interesting. Do you have a minimal repro? Or I can try doing it sometime today
18:26:09
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @linus.heckemann:matrix.mayflower.de
Is there a way to pass the flake inputs on to all machine configs? I'd like to do things like imports = [ "${inputs.nixos-mailserver}/default.nix" ]; in my machine configs.
You can pass the inputs using either meta.specialArgs.inputs = inputs; or _module.args.inputs = inputs; in a node config
18:27:23
@zhaofeng:zhaofeng.liZhaofeng Li Then inputs will be available as a NixOS module parameter. You can also go the overlays way, though. 18:28:09
@linus.heckemann:matrix.mayflower.deLinux Hackerman
In reply to @zhaofeng:zhaofeng.li
You can pass the inputs using either meta.specialArgs.inputs = inputs; or _module.args.inputs = inputs; in a node config
I tried the latter, it resulted in infinite recursion in combination with imports = [ inputs.nixos-mailserver ];
19:36:43
@linus.heckemann:matrix.mayflower.deLinux Hackermanmaybe specialArgs doesn't have that problem though? I'll give it a try19:36:59
@linus.heckemann:matrix.mayflower.deLinux Hackermanalso, a feature I'd like in colmena: the ability to pass in nixos evaluations rather than nixos configs. That would open up a lot of possibilities, including a nixus-like system where the whole deployment can be made of nixos modules too. Not sure if that goes within the "vision" of colmena though, and if not that's fine --- I don't want colmena to succumb to feature creep either :)19:48:12
@ma27:nicht-so.sexyma27 joined the room.22:52:02
26 Jan 2022
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @github:maunium.net
[zhaofengli/colmena] JCapucho opened issue #50: Nixpkgs fails to build on unstable

Hi, I'm using colmena with a flake to build a node that uses the nixos-unstable branch of nixpkgs (commit is https://github.com/NixOS/nixpkgs/commit/689b76bcf36055afdeb2e9852f5ecdd2bf483f87), but it's failing to build.

In the start of the log I see a warning with

capucho-nixos | trace: warning: The following Nixpkgs configuration keys set in meta.nixpkgs will be ignored: path

Which leads me to believe that the issue might be caused by ignoring the path attribute introduced in https://github.com/NixOS/nixpkgs/pull/153594

Here's the log of running colmena build --show-trace --verbose log.txt

For those using Colmena with nixpkgs unstable, have you encountered problems related to split doc builds? If so, could you test if the current main and this 0.2 backport branch fix the problem?
02:22:33
@zhaofeng:zhaofeng.liZhaofeng LiAdmittedly I ran into the problem a couple of weeks ago in my setup when I rebased against master, but there were comments about it blocking the channel so I disabled it locally without looking closer. Then I kind of forgot about it 🙁02:24:54
@linus.heckemann:matrix.mayflower.deLinux Hackerman
In reply to @linus.heckemann:matrix.mayflower.de
maybe specialArgs doesn't have that problem though? I'll give it a try
same problem :/
07:39:34
@zhaofeng:zhaofeng.liZhaofeng Li What does your imports looks like? 07:50:22
@zhaofeng:zhaofeng.liZhaofeng Li * What does your imports look like? 07:50:33
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @linus.heckemann:matrix.mayflower.de
I tried the latter, it resulted in infinite recursion in combination with imports = [ inputs.nixos-mailserver ];
Oh right, you probably want inputs.nixos-mailserver.nixosModule
07:50:50
@linus.heckemann:matrix.mayflower.deLinux Hackerman
{ config, pkgs, inputs, ... }:

{
  imports =
    [
      inputs.nixos-mailserver.nixosModule
    ];
08:29:28
@linus.heckemann:matrix.mayflower.deLinux Hackermanalso causes infinite recursion08:29:36
@linus.heckemann:matrix.mayflower.deLinux Hackerman I believe this is because inputs depends on the closure of nixos modules in the system, but the closure of nixos modules depends on inputs (because inputs is used right there in imports). 08:30:24
@linus.heckemann:matrix.mayflower.deLinux Hackermaninputs would have to be passed in "from outside" and can't be defined within a module.08:30:40
@github:maunium.net@github:maunium.net [zhaofengli/colmena] JCapucho closed issue #50: Nixpkgs fails to build on unstable 09:37:44
@willi:butz.cloudWilli Butz joined the room.09:43:16
@linus.heckemann:matrix.mayflower.deLinux Hackerman
In reply to @linus.heckemann:matrix.mayflower.de
also, a feature I'd like in colmena: the ability to pass in nixos evaluations rather than nixos configs. That would open up a lot of possibilities, including a nixus-like system where the whole deployment can be made of nixos modules too. Not sure if that goes within the "vision" of colmena though, and if not that's fine --- I don't want colmena to succumb to feature creep either :)
Willi Butz: ^
09:47:12
@willi:butz.cloudWilli Butz
In reply to @zhaofeng:zhaofeng.li
Admittedly I ran into the problem a couple of weeks ago in my setup when I rebased against master, but there were comments about it blocking the channel so I disabled it locally without looking closer. Then I kind of forgot about it 🙁
I did the exact same thing. I'll check the fix later today
10:11:44
@github:maunium.net@github:maunium.net [zhaofengli/colmena] zhaofengli reopened issue #50: Nixpkgs fails to build on unstable 14:51:41
@github:maunium.net@github:maunium.net [zhaofengli/colmena] zhaofengli pinned issue #50: Nixpkgs fails to build on unstable 15:00:27
@github:maunium.net@github:maunium.net [zhaofengli/colmena] zhaofengli published v0.2.1: v0.2.1 - Fix sandboxed documentation build on unstable 15:24:29
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @linus.heckemann:matrix.mayflower.de
also, a feature I'd like in colmena: the ability to pass in nixos evaluations rather than nixos configs. That would open up a lot of possibilities, including a nixus-like system where the whole deployment can be made of nixos modules too. Not sure if that goes within the "vision" of colmena though, and if not that's fine --- I don't want colmena to succumb to feature creep either :)

I thought more about it, and don't think it's a good idea since the deployment options are version-specific and Colmena depends on the structure to deserialize it correctly. Colmena should be self-contained, and confusing errors can easily occur if we allow people to "bring their own deployment options" which is required if you want to pass in an evaluated config directly.

Exposing the deployment option module for external use is fine, but Colmena should use its own when it's the one running the deployment.

17:25:17
@linus.heckemann:matrix.mayflower.deLinux Hackerman
In reply to @zhaofeng:zhaofeng.li

I thought more about it, and don't think it's a good idea since the deployment options are version-specific and Colmena depends on the structure to deserialize it correctly. Colmena should be self-contained, and confusing errors can easily occur if we allow people to "bring their own deployment options" which is required if you want to pass in an evaluated config directly.

Exposing the deployment option module for external use is fine, but Colmena should use its own when it's the one running the deployment.

Fair enough. I managed to hammer the proverbial square peg into the round hole by setting config.system.build = lib.mkForce ...; but that's really not the direction I want to go in :D I think I'll try and represent my use case with colmena's code then, but not with a view to upstreaming it
17:46:15
@willi:butz.cloudWilli Butz
In reply to @willi:butz.cloud
I did the exact same thing. I'll check the fix later today

I verified that it's fixed on v0.2.1.

had to comment out buildOnTarget though :>

18:41:44
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @willi:butz.cloud

I verified that it's fixed on v0.2.1.

had to comment out buildOnTarget though :>

Great, thanks for testing!
18:42:41
@willi:butz.cloudWilli ButzThanks for colmena! 🎉18:44:55
@github:maunium.net@github:maunium.net [zhaofengli/colmena] zhaofengli unpinned issue #11: Flake support 18:47:03

Show newer messages


Back to Room ListRoom Version: 6