!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
21 Oct 2022
@yuka:yuka.dev@yuka:yuka.devI could theoretically do that in the colmena-compat module14:45:00
@yuka:yuka.dev@yuka:yuka.devbut then not sure how to match the versions14:45:29
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @yuka:yuka.dev

nodes.nix

# This is NOT a normal colmena hive definition
# We are using our own suxin module system

{ lib, inputs, ... }:

{
  defaults = {
    specialArgs = { inherit inputs; };
    nixpkgs = lib.mkDefault inputs.nixpkgs;
    configuration = import ./common;
  };

  nodes = {
    hifipi.configuration = import ./hosts/hifipi/configuration.nix;
    monitor.configuration = import ./hosts/monitor/configuration.nix;
    tvpi.configuration = import ./hosts/tvpi/configuration.nix;
    yaya.configuration = import ./hosts/yaya/configuration.nix;
    net-vm.configuration = import ./hosts/net-vm/configuration.nix;
    yoyo.configuration = import ./hosts/yoyo/configuration.nix;

    mari.nixpkgs = inputs.musl-nixos.inputs.nixpkgs;
    mari.configuration = import ./hosts/mari/configuration.nix;

    yuyu.nixpkgs = inputs.musl-nixos.inputs.nixpkgs;
    yuyu.configuration = import ./hosts/yuyu/configuration.nix;
  };
}
Cool, how is the experience using a musl-based environment?
17:53:34
@zhaofeng:zhaofeng.liZhaofeng LiBeen wanting to use a Nix-based iSH rootfs, but glibc stuff has a tough time running on it: https://github.com/ish-app/ish/pull/181217:53:36
@yuka:yuka.dev@yuka:yuka.dev
In reply to @zhaofeng:zhaofeng.li
Cool, how is the experience using a musl-based environment?
part of the experience: track a nixpkgs fork with a few patches applied, though they should soon(tm) upstream
17:58:46
@yuka:yuka.dev@yuka:yuka.devand apply this overlay here: https://cyberchaos.dev/cyberchaoscreatures/musl-nixos/-/blob/main/overlay.nix17:59:19
@yuka:yuka.dev@yuka:yuka.devand expect stuff to be broken17:59:32
@yuka:yuka.dev@yuka:yuka.dev
In reply to @zhaofeng:zhaofeng.li
Cool, how is the experience using a musl-based environment?
* part of the experience: track a nixpkgs fork with a few patches applied, though they should soon(tm) upstream
18:01:27
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @yuka:yuka.dev
[ERROR] Failed to evaluate net-vm, monitor, tvpi, and 11 other nodes - Last 5 lines of logs:
[ERROR]  created)
[ERROR]    state) Running
[ERROR]   stderr) error: unrecognised flag '--expr'
[ERROR]   stderr) Try '/nix/store/i3avjvyfgw0ypbb5sq7w5f5d6xhyy586-nix-eval-jobs-2.9.0/bin/nix-eval-jobs --help' for more information.
[ERROR]  failure) Child process exited with error code: 1
[ERROR] Failed to complete requested operation - Last 1 lines of logs:
[ERROR]  failure) Child process exited with error code: 1
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 1

(scrolling back)

If you are building colmena with callPackage instead of from the flake, you need to use the latest version of nix-eval-jobs

19:44:58
@zhaofeng:zhaofeng.liZhaofeng Li It has a PR that hasn't landed in a release yet. 19:45:47
@yuka:yuka.dev@yuka:yuka.devThx20:32:08
22 Oct 2022
@ronixx:matrix.orgroshan | byteio.in 🌷Redacted or Malformed Event03:28:00
@ronixx:matrix.orgroshan | byteio.in 🌷image.png
Download image.png
04:44:53
@ronixx:matrix.orgroshan | byteio.in 🌷how can i pass different key for each host in colmena ?04:45:23
@palo:xaos.space@palo:xaos.space
In reply to @ronixx:matrix.org
how can i pass different key for each host in colmena ?

maybe use ~/.ssh/config to configure which hosts should use which key. Or is ssh-ng ignoring that?

12:43:19
@sofo:matrix.org@sofo:matrix.org joined the room.17:00:09
23 Oct 2022
@blaggacao:matrix.orgDavid Arnold (blaggacao)

Hi Zhaofeng Li !

I beleive colmena eval was only ever made to be impure (so the --impure option might be a mistake), see:

    introspect = f:
      f {
        lib = nixpkgs.lib // builtins;
        pkgs = nixpkgs.legacyPackages.${builtins.currentSystem};
        nodes = l.mapAttrs (evalNode {_module.check = false;}) comb;
      };

02:30:42
@blaggacao:matrix.orgDavid Arnold (blaggacao) *

Hi Zhaofeng Li !

I beleive colmena eval was only ever made to be impure (so the --impure option might be a mistake), see builtins.currentSystem in:

    introspect = f:
      f {
        lib = nixpkgs.lib // builtins;
        pkgs = nixpkgs.legacyPackages.${builtins.currentSystem};
        nodes = l.mapAttrs (evalNode {_module.check = false;}) comb;
      };

02:30:57
@blaggacao:matrix.orgDavid Arnold (blaggacao)Or am I missing something?02:31:38
@blaggacao:matrix.orgDavid Arnold (blaggacao)

So I made use of the new colmenaHive output 🦾

That's a super nice iface, imo.

  • make honey: https://github.com/divnix/hive/blob/main/make-honey.nix
  • fill it in the jar: https://github.com/divnix/hive/blob/d7119b1d5d1fd6f88c2d0c051c1512ff0edaa91f/flake.nix#L78-L84
  • pollen: https://github.com/divnix/hive/blob/d7119b1d5d1fd6f88c2d0c051c1512ff0edaa91f/comb/_QUEEN/colmenaConfigurations.nix#L8-L21
06:29:48
@blaggacao:matrix.orgDavid Arnold (blaggacao) What I do not understand as much as I try, is why I get an infinit recursion when I try to freeformType evaluate the entire configuration, including all imports. https://github.com/divnix/hive/blob/main/make-honey.nix#L83-L85 15:45:23
@linus:schreibt.jetztLinux Hackerman
In reply to @blaggacao:matrix.org
What I do not understand as much as I try, is why I get an infinit recursion when I try to freeformType evaluate the entire configuration, including all imports. https://github.com/divnix/hive/blob/main/make-honey.nix#L83-L85
Probably because options depends on imports
15:47:12
@blaggacao:matrix.orgDavid Arnold (blaggacao) What I did is I already used a custom assertion implementation under config.erased to avoid most part.of that 15:48:23
@blaggacao:matrix.orgDavid Arnold (blaggacao)* What I did is I already used a custom assertion implementation under `config.erased` to avoid most part of that15:48:30
@blaggacao:matrix.orgDavid Arnold (blaggacao) But it seems like the check = true; still want's to eagerly check all options and definitions. Even though the freeformType is undefined (amd should neither check anything, nor merge). 15:49:41
@blaggacao:matrix.orgDavid Arnold (blaggacao) I even tried to replicate the "sink" type (which btw seems broken upstream), explicitly muting the merge function. 15:50:20
@blaggacao:matrix.orgDavid Arnold (blaggacao)* But it seems like the `check = true;` still want's to eagerly check all options and definitions. Even though the freeformType is `undefined` (and should neither check anything, nor merge).15:50:42
@blaggacao:matrix.orgDavid Arnold (blaggacao)Or maybe you mean something else than what I understood?15:55:43
@blaggacao:matrix.orgDavid Arnold (blaggacao)

In the unlikely event that somebody is keen on helping with an infinite recursion, here are the neuralgic points of the trace:

       at /nix/store/gv1gp6l2gqgf7j6fpswbcdsr6yi395xy-source/make-honey.nix:123:34:

          122|               (l.mapAttrs (machine: checkAndTransformConfig user machine))
          123|               (l.filterAttrs (_: config: config.nixpkgs.system == system))
             |                                  ^
          124|               (l.mapAttrs (machine: l.nameValuePair "${user}-o-${machine}"))
[...]

       at /nix/store/5y5ndnbgvv6mfknnxv48v1swznc5g6wx-source/lib/modules.nix:751:121:

          750|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;
          751|         in throw "A definition for option `${showOption loc}' is not of type `${type.description}'. Definition values:${showDefs allInvalid}"
             |                                                                                                                         ^
          752|       else

       … while evaluating the attribute 'mergedValue'
[ ... ]

       at /nix/store/5y5ndnbgvv6mfknnxv48v1swznc5g6wx-source/lib/options.nix:342:10:

          341|       prettyEval = builtins.tryEval
          342|         (lib.generators.toPretty { }
             |          ^
          343|           (lib.generators.withRecursion { depthLimit = 10; throwOnDepthLimit = false; } def.value));

       … while evaluating anonymous lambda

[ ... ]

error: attribute 'pkgs' missing

       at /nix/store/5y5ndnbgvv6mfknnxv48v1swznc5g6wx-source/lib/modules.nix:467:28:

          466|         builtins.addErrorContext (context name)
          467|           (args.${name} or config._module.args.${name})
             |                            ^
          468|       ) (lib.functionArgs f);

       … while evaluating the module argument `pkgs' in "/nix/store/5y5ndnbgvv6mfknnxv48v1swznc5g6wx-source/nixos/modules/profiles/installation-device.nix":

       … while evaluating anonymous lambda

       at /nix/store/5y5ndnbgvv6mfknnxv48v1swznc5g6wx-source/lib/modules.nix:465:44:

          464|       context = name: ''while evaluating the module argument `${name}' in "${key}":'';
          465|       extraArgs = builtins.mapAttrs (name: _:
             |                                            ^
          466|         builtins.addErrorContext (context name)

       … from call site

       … while evaluating 'id'

       at /nix/store/5y5ndnbgvv6mfknnxv48v1swznc5g6wx-source/lib/trivial.nix:14:5:

           13|     # The value to return
           14|     x: x;
             |     ^
           15|

       … from call site

       at /nix/store/5y5ndnbgvv6mfknnxv48v1swznc5g6wx-source/lib/generators.nix:272:47:

          271|           let
          272|             evalNext = x: mapAny (depth + 1) (transform (depth + 1) x);
             |                                               ^
          273|           in

       … while evaluating anonymous lambda
16:11:28
@blaggacao:matrix.orgDavid Arnold (blaggacao) *

In the unlikely event that somebody is keen on helping with an infinite recursion, here are the neuralgic points of the trace (in reverse order):

       at /nix/store/gv1gp6l2gqgf7j6fpswbcdsr6yi395xy-source/make-honey.nix:123:34:

          122|               (l.mapAttrs (machine: checkAndTransformConfig user machine))
          123|               (l.filterAttrs (_: config: config.nixpkgs.system == system))
             |                                  ^
          124|               (l.mapAttrs (machine: l.nameValuePair "${user}-o-${machine}"))
[...]

       at /nix/store/5y5ndnbgvv6mfknnxv48v1swznc5g6wx-source/lib/modules.nix:751:121:

          750|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;
          751|         in throw "A definition for option `${showOption loc}' is not of type `${type.description}'. Definition values:${showDefs allInvalid}"
             |                                                                                                                         ^
          752|       else

       … while evaluating the attribute 'mergedValue'
[ ... ]

       at /nix/store/5y5ndnbgvv6mfknnxv48v1swznc5g6wx-source/lib/options.nix:342:10:

          341|       prettyEval = builtins.tryEval
          342|         (lib.generators.toPretty { }
             |          ^
          343|           (lib.generators.withRecursion { depthLimit = 10; throwOnDepthLimit = false; } def.value));

       … while evaluating anonymous lambda

[ ... ]

error: attribute 'pkgs' missing

       at /nix/store/5y5ndnbgvv6mfknnxv48v1swznc5g6wx-source/lib/modules.nix:467:28:

          466|         builtins.addErrorContext (context name)
          467|           (args.${name} or config._module.args.${name})
             |                            ^
          468|       ) (lib.functionArgs f);

       … while evaluating the module argument `pkgs' in "/nix/store/5y5ndnbgvv6mfknnxv48v1swznc5g6wx-source/nixos/modules/profiles/installation-device.nix":

       … while evaluating anonymous lambda

       at /nix/store/5y5ndnbgvv6mfknnxv48v1swznc5g6wx-source/lib/modules.nix:465:44:

          464|       context = name: ''while evaluating the module argument `${name}' in "${key}":'';
          465|       extraArgs = builtins.mapAttrs (name: _:
             |                                            ^
          466|         builtins.addErrorContext (context name)

       … from call site

       … while evaluating 'id'

       at /nix/store/5y5ndnbgvv6mfknnxv48v1swznc5g6wx-source/lib/trivial.nix:14:5:

           13|     # The value to return
           14|     x: x;
             |     ^
           15|

       … from call site

       at /nix/store/5y5ndnbgvv6mfknnxv48v1swznc5g6wx-source/lib/generators.nix:272:47:

          271|           let
          272|             evalNext = x: mapAny (depth + 1) (transform (depth + 1) x);
             |                                               ^
          273|           in

       … while evaluating anonymous lambda
16:11:45

Show newer messages


Back to Room ListRoom Version: 6