12 Mar 2025 |
dantefromhell | 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 | You have to specify a nixpkgs meta attribute that matches. Try passing just import nixpkgs instead of calling it. | 20:30:38 |
wantguns | i didnt get you, how do pass import nixpkgs as a meta attribute ? | 20:58:23 |
wantguns | i didnt get you, how do i pass import nixpkgs as a meta attribute ? | 20:58:29 |
13 Mar 2025 |
gmacon | 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 | 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 |
| Marcus joined the room. | 20:18:47 |
22 Mar 2025 |
| yorickvp joined the room. | 14:19:06 |
2 Jan 2022 |
| Zhaofeng Li changed the history visibility to "world_readable" from "shared". | 01:39:32 |
| Matrix Traveler (bot) joined the room. | 01:47:03 |
| @grahamc:nixos.org joined the room. | 01:49:13 |
| Zhaofeng Lichanged room power levels. | 01:50:47 |
| @grahamc:nixos.org invited NixOS Moderation Bot. | 01:52:20 |
| NixOS Moderation Bot joined the room. | 01:52:21 |
| @grahamc:nixos.orgchanged room power levels. | 01:52:22 |
| Room Avatar Renderer. | 01:52:24 |
| hexa joined the room. | 03:18:38 |
| kraem joined the room. | 05:13:02 |
| [0x4A6F] joined the room. | 09:33:21 |
3 Jan 2022 |
| angerman joined the room. | 06:49:24 |
4 Jan 2022 |
| aanderse joined the room. | 22:16:50 |
| * aanderse waves 👋 | 22:18:54 |
| Buckley joined the room. | 22:21:48 |
Buckley | 👋 | 23:42:50 |
5 Jan 2022 |
| Reventlov joined the room. | 07:40:54 |
Reventlov | hello there | 07:51:20 |
| necrophcodr joined the room. | 15:54:38 |
necrophcodr | 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 | 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 | Any ideas on how I could debug that? | 15:57:46 |