!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
3 Nov 2024
@mrtrk:matrix.orgMarco Turchetto joined the room.16:19:58
6 Nov 2024
@seapat:matrix.orgseapat joined the room.13:49:56
@khalil:ksantana.netKhalil Santana changed their display name from Khalil Santana to khalil.16:11:01
8 Nov 2024
@e1mo:chaos.jetztNina (e1mo) changed their profile picture.08:11:11
@stepbrobd:matrix.orgStepBroBD joined the room.18:59:09
11 Nov 2024
@luna:bddvlpr.comLuna joined the room.13:03:19
@luna:bddvlpr.comLunaHi, I've recently found this project and was wondering if it's possible to just replace an existing deploy-rs setup with Colmena or would it cause some issues?13:04:01
@tornax:matrix.orgtornax joined the room.18:49:13
@tornax:matrix.orgtornax
In reply to @luna:bddvlpr.com
Hi, I've recently found this project and was wondering if it's possible to just replace an existing deploy-rs setup with Colmena or would it cause some issues?
hi! As far as I know, colmena isn't a drop-in replacement for deploy-rs
18:49:37
@tornax:matrix.orgtornaxboth are using a different config structure18:49:47
13 Nov 2024
@luna:bddvlpr.comLunaWell besides reconfiguring the config structure, I’ve tried replacing deploy-rs’ flake structure with colmena’s but ran into some troubles. I’m guessing it’s because of the experimental flake support but haven’t had the time to properly look into it yet.11:53:02
15 Nov 2024
@ser:sergevictor.euser(ial)can colmena secrets deploy a whole directory, not single files only?09:51:15
@ibizaman:matrix.orgibizaman
In reply to @luna:bddvlpr.com
Well besides reconfiguring the config structure, I’ve tried replacing deploy-rs’ flake structure with colmena’s but ran into some troubles. I’m guessing it’s because of the experimental flake support but haven’t had the time to properly look into it yet.
I did the opposite for some of my machines recently to test deploy-es and had no issue. Feel free to post the log here next time.
12:25:29
@ibizaman:matrix.orgibizaman
In reply to @luna:bddvlpr.com
Well besides reconfiguring the config structure, I’ve tried replacing deploy-rs’ flake structure with colmena’s but ran into some troubles. I’m guessing it’s because of the experimental flake support but haven’t had the time to properly look into it yet.
*
12:25:36
16 Nov 2024
@luna:bddvlpr.comLuna
In reply to @ibizaman:matrix.org
I did the opposite for some of my machines recently to test deploy-es and had no issue. Feel free to post the log here next time.
Will do^
11:41:09
@rcouto:matrix.org@rcouto:matrix.org joined the room.21:35:13
@inomena:matrix.orginomena joined the room.22:45:18
@inomena:matrix.orginomena hi, looking at the docs w/flakes each host is defined in outputs.colmena.<hostname> similar to nixosConfigurations, but is it possible to instead read each host's configuration from separate files?
e.g. instead of outputs.colmena.host-a and outputs.colmena.host-b I could refer to files hosts/host-a.nix and hosts/host-b.nix (and all possible hosts within the hosts/ directory without specifying each one in flake.nix)
22:49:07
@inomena:matrix.orginomena I would still want to use outputs.colmena.meta and outputs.colmena.defaults in this scenario 22:51:13
17 Nov 2024
@inomena:matrix.orginomena

think I figured it out, or atleast it seems to work:

outputs = {nixpkgs, ...}:
  let
    hosts = nixpkgs.lib.mapAttrs'
      (filename: _: {
        name = nixpkgs.lib.nameFromURL filename ".";
        value = [ ./hosts/${filename} ];
      })
      (builtins.readDir ./hosts);
  in {
    colmena = hosts // {
      # ...
    };
};
08:39:26
@ibizaman:matrix.orgibizaman
In reply to @inomena:matrix.org

think I figured it out, or atleast it seems to work:

outputs = {nixpkgs, ...}:
  let
    hosts = nixpkgs.lib.mapAttrs'
      (filename: _: {
        name = nixpkgs.lib.nameFromURL filename ".";
        value = [ ./hosts/${filename} ];
      })
      (builtins.readDir ./hosts);
  in {
    colmena = hosts // {
      # ...
    };
};
Oh nice you went the extra mile with readDir. I was going to suggest plain imports but that works well!
08:57:01
@inomena:matrix.orginomenaI wanted it to be fully dynamic, so that the only thing I need to do to add a new host to the hive is to define a single <hostname>.nix file in the hosts dir and nothing else08:57:56
@inomena:matrix.orginomenanot having to also define it in a few other places08:58:09
@inomena:matrix.orginomena * not having to also define imports in a few other places08:58:18
@nixy:nixy.moenixy
In reply to @ser:sergevictor.eu
can colmena secrets deploy a whole directory, not single files only?
I don't believe so. But you can use the keyCommand option to create an archive (tar, zip) from a directory and then use systemd services to extract it. That's what I do for this at least
14:06:26
@ser:sergevictor.euser(ial)that's a nice concept, i didn't think about it, thanks!14:08:58
@jh-devv:matrix.org@jh-devv:matrix.org joined the room.18:39:43
@jh-devv:matrix.org@jh-devv:matrix.orgWhat tool do you people think would fit well with Colmena when deploying bare metal?18:50:44
@jh-devv:matrix.org@jh-devv:matrix.orgUnattended install etc.18:50:52
18 Nov 2024
@luna:bddvlpr.comLuna
In reply to@ibizaman:matrix.org
I did the opposite for some of my machines recently to test deploy-rs and had no issue. Feel free to post the log here next time.
Finally got to it, here's what I get:
[INFO ] Enumerating nodes...
error:
       … while calling the 'attrNames' builtin
         at «string»:1:190:
            1| with builtins; let assets = getFlake "path:/tmp/colmena-assets-HeCr3l?lastModified=1731921370&narHash=sha256-xWcw5WYfWGtmkZGFW7NjzxlGh8vDejJzDNJj2nJg7Dk%3D"; hive = assets.processFlake; in attrNames hive.nodes
             |                                                                                                                                                                                              ^

       … while calling the 'getFlake' builtin
         at «string»:1:29:
            1| with builtins; let assets = getFlake "path:/tmp/colmena-assets-HeCr3l?lastModified=1731921370&narHash=sha256-xWcw5WYfWGtmkZGFW7NjzxlGh8vDejJzDNJj2nJg7Dk%3D"; hive = assets.processFlake; in attrNames hive.nodes
             |                             ^

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: cannot update unlocked flake input 'hive' in pure mode
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 1
Hint: Backtrace available - Use `RUST_BACKTRACE=1` environment variable to display a backtrace
09:17:57

Show newer messages


Back to Room ListRoom Version: 6