!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
15 Sep 2022
@ronnypfannschmidt:matrix.org@ronnypfannschmidt:matrix.org joined the room.04:14:54
17 Sep 2022
@rgrunbla:matrix.orgReventlovHey07:53:17
@rgrunbla:matrix.orgReventlovI probably asked for this before, but is there a possibility to deploy directories using colmena deploy keys ?07:53:33
@rgrunbla:matrix.orgReventlovAlso, can I use the same filename for different secrets in deployment.keys ? (it should be possible as I can put them in different directories)08:01:51
@farcaller:matrix.orgfarcaller

why doesn't colmena pass pkgs to the default in flakes mode? (and how can I break/trace from colmena eval? it mostly sigaborts on me)

[INFO ] Enumerating nodes...
error: anonymous function at /nix/store/slfh70c84zn9fc9h27spd5b2yaf3hlp7-source/lib/vm/configuration.nix:1:1 called without required argument 'pkgs'

       at /nix/store/slfh70c84zn9fc9h27spd5b2yaf3hlp7-source/lib/colmena/default.nix:17:20:

           17|   defaults = args: import ../vm/configuration.nix args;
             |                    ^
           18| }
19:52:43
@farcaller:matrix.orgfarcaller *

why doesn't colmena pass pkgs to the defaults in flakes mode? (and how can I break/trace from colmena eval? it mostly sigaborts on me)

[INFO ] Enumerating nodes...
error: anonymous function at /nix/store/slfh70c84zn9fc9h27spd5b2yaf3hlp7-source/lib/vm/configuration.nix:1:1 called without required argument 'pkgs'

       at /nix/store/slfh70c84zn9fc9h27spd5b2yaf3hlp7-source/lib/colmena/default.nix:17:20:

           17|   defaults = args: import ../vm/configuration.nix args;
             |                    ^
           18| }
19:53:23
18 Sep 2022
@lgcl:lgcl.delgcl (she/they) joined the room.06:30:05
@palo:xaos.space@palo:xaos.space
In reply to @farcaller:matrix.org
*

why doesn't colmena pass pkgs to the defaults in flakes mode? (and how can I break/trace from colmena eval? it mostly sigaborts on me)

[INFO ] Enumerating nodes...
error: anonymous function at /nix/store/slfh70c84zn9fc9h27spd5b2yaf3hlp7-source/lib/vm/configuration.nix:1:1 called without required argument 'pkgs'

       at /nix/store/slfh70c84zn9fc9h27spd5b2yaf3hlp7-source/lib/colmena/default.nix:17:20:

           17|   defaults = args: import ../vm/configuration.nix args;
             |                    ^
           18| }

Where does these args come from? Is configuraton.nix a file that is expected to be loaded by imports (not import) by the nixos-module system?

07:24:31
@farcaller:matrix.orgfarcaller
In reply to @palo:xaos.space

Where does these args come from? Is configuraton.nix a file that is expected to be loaded by imports (not import) by the nixos-module system?

literally from the same line :) I rewrote it as {pkgs,...} @ args: import ../vm/configuration.nix args and it worked and I don’t know why
07:26:17
@farcaller:matrix.orgfarcallerbut the reason I do it is because I wsnt to use the same configuration I have for nixos-generators as my defaults07:26:59
@farcaller:matrix.orgfarcaller and I need to pass it an extra argument (so actually it's args // {inherit datadir;} in the end there 07:27:40
@farcaller:matrix.orgfarcaller* but the reason I do it is because I want to use the same configuration I have for nixos-generators as my defaults07:28:39
@yuka:yuka.dev@yuka:yuka.devProbably lib.functionArgs is used on this function somewhere07:30:42
@palo:xaos.space@palo:xaos.space

I would use the specialArgs parameter to pass datadir. You can use the same configuration if you use a let block and define it as variable or something.

07:31:04
@yuka:yuka.dev@yuka:yuka.devSo it works as in callPackage07:31:06
@farcaller:matrix.orgfarcaller
In reply to @palo:xaos.space

I would use the specialArgs parameter to pass datadir. You can use the same configuration if you use a let block and define it as variable or something.

yeah, that's what I do in the generator config. I don’t think I can do the same with colmena, though
07:32:27
@palo:xaos.space@palo:xaos.space

https://colmena.cli.rs/unstable/reference/meta.html#specialargs and https://github.com/nix-community/nixos-generators/blob/master/flake.nix#L29

07:32:35
@palo:xaos.space@palo:xaos.space
In reply to @farcaller:matrix.org
In reply to @palo:xaos.space

I would use the specialArgs parameter to pass datadir. You can use the same configuration if you use a let block and define it as variable or something.

yeah, that's what I do in the generator config. I don’t think I can do the same with colmena, though

Yes you can :D

07:32:49
@farcaller:matrix.orgfarcaller
In reply to @yuka:yuka.dev
Probably lib.functionArgs is used on this function somewhere
that's the conclusion I came to in the end. Nix is very non-trivial to debug sometimes :(
07:33:13
@farcaller:matrix.orgfarcaller
In reply to @palo:xaos.space

https://colmena.cli.rs/unstable/reference/meta.html#specialargs and https://github.com/nix-community/nixos-generators/blob/master/flake.nix#L29

whelp, someone didn’t RTFM to the end. Thanks!
07:33:44
@ronnypfannschmidt:matrix.org@ronnypfannschmidt:matrix.orgAre there any plans to support deployment of nixosSystem declarations in a flake? 11:34:26
@cw:kernelpanic.cafeChinchilla Wetreat left the room.19:43:39
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @ronnypfannschmidt:matrix.org
Are there any plans to support deployment of nixosSystem declarations in a flake?
Not officially, but there are wrappers that do that. I've posted a longer explanation here. Luckily, with the latest changes (more on this in a bit), you can either do it the other way (generate nixosConfigurations from Colmena configurations with colmena.lib.makeHive) or replace the evaluation logic in the colmenaHive output.
23:50:00
@zhaofeng:zhaofeng.liZhaofeng Li

A couple updates:

  • More work was done on separating the evaluation logic from the deployment logic, with the new colmenaHive output being the integration point that ties the two halves together. Colmena can now deploy from the colmenaHive output which should be an already-evaluated hive generated by colmena.lib.makeHive (or your own logic!). Example here. cc David Arnold (blaggacao) Yureka (she/her)
  • Flake-enabled deployments now use nix copy and the new SSH store protocol (ssh-ng://) for copying closures to remote hosts.
23:50:17
20 Sep 2022
@rendakuenthusiast:imperishable.name@rendakuenthusiast:imperishable.name

I'm getting the following error trying to use colmena to deploy to a remote host:

          | Failed: Child process exited with error code: 3
[ERROR] Failed to deploy to <remote host> - Last 9 lines of logs:
[ERROR]  created)
[ERROR]    state) Running
[ERROR]   stderr) activating the configuration...
[ERROR]   stdout) setting up /etc...
[ERROR]   stderr) reloading user units for root...
[ERROR]   stderr) setting up tmpfiles
[ERROR]   stderr) fchownat() of /blockchains/bitcoin failed: Invalid argument
[ERROR]  failure) Child process exited with error code: 3
[ERROR] Failed to complete requested operation - Last 1 lines of logs:
[ERROR]  failure) Child process exited with error code: 3
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 3


is there anything I do with colmena to get more debug output about exactly what is causing the failing fchownat line?

08:08:09
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @rendakuenthusiast:imperishable.name

I'm getting the following error trying to use colmena to deploy to a remote host:

          | Failed: Child process exited with error code: 3
[ERROR] Failed to deploy to <remote host> - Last 9 lines of logs:
[ERROR]  created)
[ERROR]    state) Running
[ERROR]   stderr) activating the configuration...
[ERROR]   stdout) setting up /etc...
[ERROR]   stderr) reloading user units for root...
[ERROR]   stderr) setting up tmpfiles
[ERROR]   stderr) fchownat() of /blockchains/bitcoin failed: Invalid argument
[ERROR]  failure) Child process exited with error code: 3
[ERROR] Failed to complete requested operation - Last 1 lines of logs:
[ERROR]  failure) Child process exited with error code: 3
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 3


is there anything I do with colmena to get more debug output about exactly what is causing the failing fchownat line?

Looks like some systemd-tmpfiles config that you have. You can manually rerun the activation by executing /nix/var/nix/profiles/system/bin/switch-to-configuration switch on the remote host.
09:35:41
@m_algery:leohoo.xyz@m_algery:leohoo.xyz joined the room.15:13:53
@m_algery:leohoo.xyz@m_algery:leohoo.xyz left the room.15:13:56
@brokenwifi:matrix.orgbrokenwifi joined the room.17:52:49
@brokenwifi:matrix.orgbrokenwifiRedacted or Malformed Event17:56:36

Show newer messages


Back to Room ListRoom Version: 6