!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
13 Apr 2025
@ststefa:matrix.orgststefaGreat, thanks a lot, I'll try that! However I still think it'd be somehow more elegant to have a NixOS base image. Not? Is that too hard to do for some reason?09:23:31
@dish1892:matrix.orgdish1892 For sure, but infect is easier and I’m lazy 09:25:04
@ststefa:matrix.orgststefa;)09:26:18
@dish1892:matrix.orgdish1892There’s also another tool called nixos anywhere which can do partitioning aswell09:26:21
@ststefa:matrix.orgststefaCool, thanks for the hints, they'll probably give me a lot more tinkering pleasure ;)09:27:29
@dish1892:matrix.orgdish1892Sure thing!🌞09:30:05
@dantefromhell:matrix.orgdantefromhell
In reply to @dish1892:matrix.org
There’s also another tool called nixos anywhere which can do partitioning aswell
using this for all my servers cause it can do partitioning & formatting. also has an easy way to upload ssh host keys so agenix works on first boot
11:39:30
15 Apr 2025
@gmacon:matrix.orggmacon I proposed adding a reboot subcommand to colmena to see what people think about the idea. If you have thoughts, please share them here or on the issue. Thanks! 16:13:43
@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 "--force-replace-unknown-profiles" then it will reboot, but none of my changes seems to get applied.
16:49:24
@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. 16:58:29
@dish1892:matrix.orgdish1892
In reply to @ststefa:matrix.org
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 "--force-replace-unknown-profiles" then it will reboot, but none of my changes seems to get applied.
Shouldn’t matter but try set the ”replace unknown profile” setting in the config instead
18:13:00
@dish1892:matrix.orgdish1892
In reply to @gmacon:matrix.org
I proposed adding a reboot subcommand to colmena to see what people think about the idea. If you have thoughts, please share them here or on the issue. Thanks!
If i understand it right you want to run pre-apply commands?
18:15:33
@dish1892:matrix.orgdish1892
In reply to @ststefa:matrix.org
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 "--force-replace-unknown-profiles" then it will reboot, but none of my changes seems to get applied.
*
18:17:26
@gmacon:matrix.orggmaconI don't think so... Did you have something specific in mind for a pre-apply command?18:17:43
@ststefa:matrix.orgststefaMy intention was just to configure the remote with some packages and settings.18:36:14
@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

Show newer messages


Back to Room ListRoom Version: 6