!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
15 Apr 2025
@ststefa:matrix.orgststefaIf I may, I could post my flake.nix18:36:29
@ststefa:matrix.orgststefa *

Hey there! The nixos-infect works quite nicely, thanks again!
Now when I try to apply to the aarch64-linux node from my aarch64-darwin using colnema (using deployment.buildOnTarget), it will somehow not "activate the profile".
I don't quite get what that means :-/
I tried:
colmena apply --reboot --force-replace-unknown-profiles
I get:

failure) Unexpected active profile: Profile(StorePath("/nix/store/0pi9dwfl661k77k8zvacz1h7ikj2hlsi-nixos-system-arm-1-24.11.716947.26d499fc9f1d"))

Any ideas? Maybe this is a noob-trap?
If I run without "--reboot" then colmena will finish without errors, but none of my changes seems to get applied.

18:40:57
@ststefa:matrix.orgststefa *

Hey there! The nixos-infect works quite nicely, thanks again!
Now when I try to apply to the aarch64-linux node from my aarch64-darwin using colnema (using deployment.buildOnTarget), it will somehow not "activate the profile".
I don't quite get what that means :-/
I tried:
colmena apply --reboot --force-replace-unknown-profiles
I get:
failure) Unexpected active profile: Profile(StorePath("/nix/store/0pi9dwfl661k77k8zvacz1h7ikj2hlsi-nixos-system-arm-1-24.11.716947.26d499fc9f1d"))

Any ideas? Maybe this is a noob-trap?
If I run without "--reboot" then colmena will finish without errors, but none of my changes seems to get applied.

18:41:30
@ststefa:matrix.orgststefaAh, I think I'm a step closer. After the apply, sshd gets killed on the remote. But if I try a command which I declared in colmena (using a console), it's available. However, after a reboot, everything is back to the state before colmena ran. Looks like the new profile is somehow not set as the active profile?18:57:42
@ststefa:matrix.orgststefaHm, is grub somehow hardcoded in colmena? Asking because I did my experiments with systemd-boot systems19:17:29
@ststefa:matrix.orgststefaAh, I think I did a mess with systemd-boot (on the system) vs. grub (in my flake)19:31:07
@dish1892:matrix.orgdish1892Did you use the hardware-config.nix from the system where you installed nix on? (With nixinfect)19:54:33
@ststefa:matrix.orgststefaNo, I didn‘t grasp that the colmena deployment process is entirely unrelated to the „nixos-rebuild approach. Now that makes sense. But it also means that I should somehow collect the /etc/nixos/configuration.nix plus imported files and base my colmenas input on that, no? Is there maybe a clever workflow to do that? Or is there a better approach?21:04:12
@ststefa:matrix.orgststefaMy goal would be to build a fully automated workflow which is agnostic to any pre-existing state/config21:09:14
16 Apr 2025
@dustee:matrix.orgdustee

i can build this configuration with nixos-rebuild but colmena throws infinite recursion, is there a way to fix it?

{
  inputs,
  ...
}: {
  imports = [
     # this file configures some third party module and the imported function requires inputs as a consequence
    (import "${inputs.my-flake}/modules-profiles/some-app-configs/default-with-inputs.nix")
  ];

… while evaluating the module argument `inputs'
error: infinite recursion encountered

22:21:50
@dustee:matrix.orgdustee *

i can build this nixos host configuration with nixos-rebuild but colmena throws infinite recursion, is there a way to fix it?

{
  inputs,
  ...
}: {
  imports = [
     # this file configures some third party module and the imported function requires inputs as a consequence
    (import "${inputs.my-flake}/modules-profiles/some-app-configs/default-with-inputs.nix")
  ];

… while evaluating the module argument `inputs'
error: infinite recursion encountered

22:22:00
18 Apr 2025
@fabaff:matrix.orgfabaff joined the room.18:03:45
19 Apr 2025
@sako:sako.lolsako -w- left the room.17:36:43
20 Apr 2025
@mannp:mannuk.rocksmannp changed their profile picture.20:22:14
21 Apr 2025
@tammi:greyseal.euTammi (ey/em) left the room.10:24:43
24 Apr 2025
@lantian:lantian.pubLan Tian joined the room.16:37:36
25 Apr 2025
@clara_bnuuy:matrix.orgclara joined the room.13:51:41
@clara_bnuuy:matrix.orgclaraHi! I'm trying to evaluate the colmena hosts from a flake, but I'm running into some issues. My goal is to have a JSON with nodes & their configs. I tried to run `colmena eval -E "{ nodes, ... }: nodes --experimental-flake-eval`, but ran into issues since it's trying to serialize a function into JSON. I ran into https://github.com/zhaofengli/colmena/issues/43 which seems to indicate what I'm looking for is not possible, but I was wondering if anyone knew of a way.13:58:07
@clara_bnuuy:matrix.orgclara changed their display name from clara_bnuuy to clara.13:58:48
28 Apr 2025
@louis2747:matrix.orgLouis2747 joined the room.14:58:38
29 Apr 2025
@ygt:matrix.org@ygt:matrix.org left the room.23:39:49
1 May 2025
@rosariopulella:matrix.orgRosuavio changed their display name from Rosario Pulella to Rosuavio.20:08:59
5 May 2025
@mel05saq:inphima.de@mel05saq:inphima.de left the room.07:41:07
@andtheysay:matrix.organdtheysay joined the room.16:20:09
7 May 2025
@wimpress:matrix.org@wimpress:matrix.org changed their profile picture.15:12:00
8 May 2025
@ixxie:matrix.orgixxie

Hey folks,

Does anybody have a nice example of how to organize a repo with code for both initialising new host (e.g. with nixos-anywhere) and provisioning with colmena afterwards?

17:28:02
@wimpress:matrix.org@wimpress:matrix.org left the room.20:11:37
@dantefromhell:matrix.orgdantefromhell
In reply to @ixxie:matrix.org

Hey folks,

Does anybody have a nice example of how to organize a repo with code for both initialising new host (e.g. with nixos-anywhere) and provisioning with colmena afterwards?

I built mine with terranix and divnix/hive.
Might be slightly over engineered but I have a need for maintaining multiple environments at once. so the overengineering helps 🤣
20:53:40
10 May 2025
@shyim:matrix.orgShyimRedacted or Malformed Event09:07:29
@Valodim:stratum0.orgValodim
In reply to @ixxie:matrix.org

Hey folks,

Does anybody have a nice example of how to organize a repo with code for both initialising new host (e.g. with nixos-anywhere) and provisioning with colmena afterwards?

The simple way is: have a "blank" nixosConfiguration in your flake that contains a simplified basic installation, run nixos-anywhere, then deploy as a specific host via colmena
11:00:49

Show newer messages


Back to Room ListRoom Version: 6