!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
30 Dec 2023
@philipp:woelfel.ca@philipp:woelfel.ca left the room.05:46:24
@happyalu:matrix.org@happyalu:matrix.org left the room.10:09:57
@ibizaman:matrix.orgibizaman chinchilla optional I would put all that in your ssh config file. This usually always works vs. environment variables. Can you post your exact ssh command?  15:52:20
@hexa:lossy.networkhexassh -p 1122 -J localhost16:12:25
@hexa:lossy.networkhexa * ssh -p 1122 localhost16:12:34
@cw:kernelpanic.cafeChinchilla Optional
In reply to @ibizaman:matrix.org
chinchilla optional I would put all that in your ssh config file. This usually always works vs. environment variables. Can you post your exact ssh command? 
Yes that was my workaround.
16:42:04
@cw:kernelpanic.cafeChinchilla Optional ssh -L "1122:[ipv6:add:ress:goes:here]:22" foobar.com was the port forwarding command 16:44:34
@ibizaman:matrix.orgibizaman TIL a few days ago, you can have your ssh config file anywhere and use the -F option to specify the config file. ssh -F <path/to/config> ....
I used that recently to simplify some gnarly ssh commands in a project I have https://github.com/ibizaman/selfhostblocks/blob/main/demo/nextcloud/ssh_config
18:05:40
@raitobezarius:matrix.orgraitobezarius changed their display name from raitobezarius (DECT 2128) to raitobezarius.19:52:15
@tommy:datenkollektiv.netTommy changed their display name from Tommy (☎️ 2903) to Tommy.23:29:32
31 Dec 2023
@hexa:lossy.networkhexa
❯ colmena build -v --show-trace
[INFO ] Using configuration: /home/hexa/git/chaos/infra-nix/hive.nix
[INFO ] Enumerating nodes...
error:
       … while evaluating attribute 'archive.darmstadt.ccc.de'

         at /nix/store/fgdyf58bmkl0y2ykl06fmzqjrjv9kqf3-nixos-23.11-src/lib/attrsets.nix:560:14:

          559|     value:
          560|     { inherit name value; };
             |              ^
          561|

       … while calling anonymous lambda

         at /run/user/1000/colmena-assets-LXWf6W/eval.nix:188:39:

          187|   toplevel =         lib.mapAttrs (_: v: v.config.system.build.toplevel) nodes;
          188|   deploymentConfig = lib.mapAttrs (_: v: v.config.deployment)            nodes;
             |                                       ^
          189|   deploymentConfigSelected = names: lib.filterAttrs (name: _: elem name names) deploymentConfig;

       … while calling 'g'

         at /nix/store/fgdyf58bmkl0y2ykl06fmzqjrjv9kqf3-nixos-23.11-src/lib/attrsets.nix:701:19:

          700|           g =
          701|             name: value:
             |                   ^
          702|             if isAttrs value && cond value

       … from call site

         at /nix/store/fgdyf58bmkl0y2ykl06fmzqjrjv9kqf3-nixos-23.11-src/lib/attrsets.nix:704:20:

          703|               then recurse (path ++ [name]) value
          704|               else f (path ++ [name]) value;
             |                    ^
          705|         in mapAttrs g;

       … while calling anonymous lambda

         at /nix/store/fgdyf58bmkl0y2ykl06fmzqjrjv9kqf3-nixos-23.11-src/lib/modules.nix:242:72:

          241|           # For definitions that have an associated option
          242|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          243|

       … while evaluating the option `_module.freeformType':

       … while calling anonymous lambda

         at /nix/store/fgdyf58bmkl0y2ykl06fmzqjrjv9kqf3-nixos-23.11-src/lib/modules.nix:538:19:

          537|     mergeModules' prefix modules
          538|       (concatMap (m: map (config: { file = m._file; inherit config; }) (pushDownProperties m.config)) modules);
             |                   ^
          539|

       … from call site

         at /nix/store/fgdyf58bmkl0y2ykl06fmzqjrjv9kqf3-nixos-23.11-src/lib/modules.nix:538:73:

          537|     mergeModules' prefix modules
          538|       (concatMap (m: map (config: { file = m._file; inherit config; }) (pushDownProperties m.config)) modules);
             |                                                                         ^
          539|

       … while calling 'pushDownProperties'

         at /nix/store/fgdyf58bmkl0y2ykl06fmzqjrjv9kqf3-nixos-23.11-src/lib/modules.nix:874:24:

          873|   */
          874|   pushDownProperties = cfg:
             |                        ^
          875|     if cfg._type or "" == "merge" then

       … from call site

         at /nix/store/fgdyf58bmkl0y2ykl06fmzqjrjv9kqf3-nixos-23.11-src/nixos/lib/eval-config.nix:50:8:

           49|     config = lib.mkMerge (
           50|       (optional (system != null) {
             |        ^
           51|         # Explicit `nixpkgs.system` or `nixpkgs.localSystem` should override

       … while calling 'optional'

         at /nix/store/fgdyf58bmkl0y2ykl06fmzqjrjv9kqf3-nixos-23.11-src/lib/lists.nix:359:20:

          358|   */
          359|   optional = cond: elem: if cond then [elem] else [];
             |                    ^
          360|

       error: attribute 'system' missing

       at /run/user/1000/colmena-assets-LXWf6W/eval.nix:143:18:

          142|     };
          143|   in evalConfig {
             |                  ^
          144|     inherit (npkgs) system;
       Did you mean one of mystem, systemc, systemd, syntex or systemfd?
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 1
Hint: Backtrace available - Use `RUST_BACKTRACE=1` environment variable to display a backtrace
01:36:54
@hexa:lossy.networkhexafailing eval for some reason01:37:02
@hexa:lossy.networkhexanpkgs is probably the node nixpkgs?01:37:20
@hexa:lossy.networkhexa
let
  sources = import ./nix/sources.nix;

  defaultSystem = "x86_64-linux";
  defaultPkgs = sources."nixos-23.11";

  lib = import (defaultPkgs + "/lib");

  machines = {
    "archive.darmstadt.ccc.de" = {};
    "bitwarden.darmstadt.ccc.de" = {};
    "md.darmstadt.ccc.de" = {};
    "monitoring.darmstadt.ccc.de" = {};
    "mx1.darmstadt.ccc.de" = {
      system = "aarch64-linux";
    };
    "proxmox.darmstadt.ccc.de" = {};
    "sso1.darmstadt.ccc.de" = {};
    "sso2.darmstadt.ccc.de" = {};
    "todo.darmstadt.ccc.de" = {};
    "wiki.darmstadt.ccc.de" = {};
  };

  # per machine entrypoint
  mkMachine = hostName: {
    system ? defaultSystem,
    packages ? defaultPkgs,
    ...
  }: {
    imports = [
      ./common.nix
      ./machines/${hostName}
    ];

    nixpkgs = {
      inherit system;
    };
  };

in

{
  meta = {
    # https://colmena.cli.rs/unstable/tutorial/index.html#basic-configuration
    nixpkgs = import defaultPkgs {};

    # Allow overriding package set and system architecture per machine
    nodeNixpkgs = lib.mapAttrs (hostName: {
      packages ? defaultPkgs,
      system ? defaultSystem,
      ...
    }: (import packages { inherit system; }))
    machines;
  };

}
// lib.mapAttrs mkMachine machines
01:37:47
@hexa:lossy.networkhexa *
let
  sources = import ./nix/sources.nix;

  defaultSystem = "x86_64-linux";
  defaultPkgs = sources."nixos-23.11";

  lib = import (defaultPkgs + "/lib");

  machines = {
    "archive.darmstadt.ccc.de" = {};
    "bitwarden.darmstadt.ccc.de" = {};
    "md.darmstadt.ccc.de" = {};
    "monitoring.darmstadt.ccc.de" = {};
    "mx1.darmstadt.ccc.de" = {
      system = "aarch64-linux";
    };
    "proxmox.darmstadt.ccc.de" = {};
    "sso1.darmstadt.ccc.de" = {};
    "sso2.darmstadt.ccc.de" = {};
    "todo.darmstadt.ccc.de" = {};
    "wiki.darmstadt.ccc.de" = {};
  };

  # per machine entrypoint
  mkMachine = hostName: {
    system ? defaultSystem,
    packages ? defaultPkgs,
    ...
  }: {
    imports = [
      ./common.nix
      ./machines/${hostName}
    ];

    nixpkgs = {
      inherit system;
    };
  };

in

{
  meta = {
    # https://colmena.cli.rs/unstable/tutorial/index.html#basic-configuration
    nixpkgs = import defaultPkgs {};

    # Allow overriding package set and system architecture per machine
    nodeNixpkgs = lib.mapAttrs (hostName: {
      packages ? defaultPkgs,
      system ? defaultSystem,
      ...
    }: (import packages { inherit system; }))
    machines;
  };

}
// lib.mapAttrs mkMachine machines
01:37:49
@hexa:lossy.networkhexa this is the hive.nix 01:37:55
@raitobezarius:matrix.orgraitobezarius shoudln't this be localSystem ? 01:46:39
@raitobezarius:matrix.orgraitobezarius or crossSystem ? 01:46:42
@hexa:lossy.networkhexain L52?01:47:03
@raitobezarius:matrix.orgraitobezariusL3601:47:10
@raitobezarius:matrix.orgraitobezariusand L52 too01:47:14
@raitobezarius:matrix.orgraitobezariusbut I think it works01:47:17
@raitobezarius:matrix.orgraitobezariuslocalSystem works too for me01:47:26
@raitobezarius:matrix.orgraitobezarius I wonder if it could have an effect to use the system rather than localSystem 01:47:39
@raitobezarius:matrix.orgraitobezariusin the rest of the machinery01:47:43
@hexa:lossy.networkhexaI think system is the legacy way probably?01:47:56
@raitobezarius:matrix.orgraitobezariusyep01:48:07
@hexa:lossy.networkhexa
  error: assertion '(((args) ? localSystem) -> (! ((args) ? system)))' failed
01:48:35
@hexa:lossy.networkhexa same error with localSystem = system 01:48:56
@raitobezarius:matrix.orgraitobezariusok01:49:23

Show newer messages


Back to Room ListRoom Version: 6