!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
12 Mar 2025
@dantefromhell:matrix.orgdantefromhell
In reply to @wantguns:matrix.org
if there is an example flake i can follow which uses the output / config of a darwinConfiguration as colmena's host's options, that would help a lot
my best way to finding code examples is github search 🥴 you can use lang: nix + whatever snippet you know needs to show up in your code.
12:50:02
@gmacon:matrix.orggmacon You have to specify a nixpkgs meta attribute that matches. Try passing just import nixpkgs instead of calling it. 20:30:38
@wantguns:matrix.orgwantguns i didnt get you, how do pass import nixpkgs as a meta attribute ? 20:58:23
@wantguns:matrix.orgwantguns i didnt get you, how do i pass import nixpkgs as a meta attribute ? 20:58:29
13 Mar 2025
@gmacon:matrix.orggmacon

In your flake.nix on line 43 you have

nixpkgs = import nixpkgs { system = "x86_64-linux"; };

I'm suggesting you instead write

nixpkgs = import nixpkgs;
12:44:23
14 Mar 2025
@wantguns:matrix.orgwantguns okay, i tried that but it still gave me the same error, i have now moved on to using deploy-rs, and deploy based on activations:
# ...
      deploy = {
        nodes = builtins.mapAttrs (name: hostConfig:
          let 
            isDarwin = hostConfig.platform == "darwin";
            activationPath = if isDarwin 
              then deploy-rs.lib.${hostConfig.system}.activate.darwin self.darwinConfigurations.${name}
              else deploy-rs.lib.${hostConfig.system}.activate.nixos self.nixosConfigurations.${name};
          in {
            hostname = hostConfig.hostname;
            profiles.system = {
              user = if isDarwin then hostConfig.username else "root";
              path = activationPath;
            };
          }
        ) hosts;
      };
# ...
10:14:42
21 Mar 2025
@marcusramberg:matrix.orgMarcus joined the room.20:18:47
22 Mar 2025
@yorickvp:matrix.orgyorickvp joined the room.14:19:06
2 Jan 2022
@zhaofeng:zhaofeng.liZhaofeng Li changed the history visibility to "world_readable" from "shared".01:39:32
@voyager:t2bot.ioMatrix Traveler (bot) joined the room.01:47:03
@grahamc:nixos.org@grahamc:nixos.org joined the room.01:49:13
@zhaofeng:zhaofeng.liZhaofeng Lichanged room power levels.01:50:47
@grahamc:nixos.org@grahamc:nixos.org invited @mjolnir:nixos.orgNixOS Moderation Bot.01:52:20
@mjolnir:nixos.orgNixOS Moderation Bot joined the room.01:52:21
@grahamc:nixos.org@grahamc:nixos.orgchanged room power levels.01:52:22
Room Avatar Renderer.01:52:24
@hexa:lossy.networkhexa joined the room.03:18:38
@kraem:ne.bul.aekraem joined the room.05:13:02
@0x4a6f:matrix.org[0x4A6F] joined the room.09:33:21
3 Jan 2022
@angerman:matrix.organgerman joined the room.06:49:24
4 Jan 2022
@aanderse:nixos.devaanderse joined the room.22:16:50
* @aanderse:nixos.devaanderse waves 👋22:18:54
@buckley310:matrix.orgBuckley joined the room.22:21:48
@buckley310:matrix.orgBuckley👋23:42:50
5 Jan 2022
@rgrunbla:matrix.orgReventlov joined the room.07:40:54
@rgrunbla:matrix.orgReventlovhello there07:51:20
@necrophcodr:matrix.orgnecrophcodr joined the room.15:54:38
@necrophcodr:matrix.orgnecrophcodr

I'm getting the following error on a simple deployment at the moment:

-> % colmena apply
[INFO ] Enumerating nodes...
error: infinite recursion encountered

       at /nix/store/y41rr1klzvwrmjs6smyl8kd1ipa5m5kj-source/lib/modules.nix:305:28:

          304|         builtins.addErrorContext (context name)
          305|           (args.${name} or config._module.args.${name})
             |                            ^
          306|       ) (lib.functionArgs f);
(use '--show-trace' to show detailed location information)
[ERROR] -----
[ERROR] Operation failed with error: Nix exited with error code: 1
15:55:24
@necrophcodr:matrix.orgnecrophcodr

NixOS config is

{ config, lib, pkgs, modulesPath, home-manager, ... }:
{
  deployment = {
    targetHost = "192.168.x.y";
    targetUser = "nixos";
    tags = [ "rpi" "lab" ];
  };

  imports = [
    (home-manager + "/nixos")
  ];
}
15:55:50
@necrophcodr:matrix.orgnecrophcodrAny ideas on how I could debug that?15:57:46

Show newer messages


Back to Room ListRoom Version: 6