!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
20 Nov 2022
@cw:kernelpanic.cafeChinchilla Washington
error: infinite recursion encountered

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:496:28:

          495|         builtins.addErrorContext (context name)
          496|           (args.${name} or config._module.args.${name})
             |                            ^
          497|       ) (lib.functionArgs f);

       … while evaluating the module argument `zero' in "/nix/store/g7018b1j9a4qgrmd5xqx3qc5qilrfbs3-source/users/cw.nix":

       … while evaluating anonymous lambda

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:494:44:

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

       … from call site

       … while evaluating 'isFunction'

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/trivial.nix:441:16:

          440|   */
          441|   isFunction = f: builtins.isFunction f ||
             |                ^
          442|     (f ? __functor && isFunction (f.__functor f));

       … from call site

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:377:12:

          376|       loadModule = args: fallbackFile: fallbackKey: m:
          377|         if isFunction m || isAttrs m then
             |            ^
          378|           unifyModuleSyntax fallbackFile fallbackKey (applyModuleArgsIfFunction fallbackKey m args)

       … while evaluating 'loadModule'

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:376:53:

          375|       # Like unifyModuleSyntax, but also imports paths and calls functions if necessary
          376|       loadModule = args: fallbackFile: fallbackKey: m:
             |                                                     ^
          377|         if isFunction m || isAttrs m then

       … from call site

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:417:22:

          416|           let
          417|             module = loadModule args parentFile "${parentKey}:anon-${toString n}" x;
             |                      ^
          418|             collectedImports = collectStructuredModules module._file module.key module.imports args;

       … while evaluating the attribute 'disabled'

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:412:13:

          411|           collectResults = modules: {
          412|             disabled = concatLists (catAttrs "disabled" modules);
             |             ^
          413|             inherit modules;

       … while evaluating the attribute 'disabled'

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:412:13:

          411|           collectResults = modules: {
          412|             disabled = concatLists (catAttrs "disabled" modules);
             |             ^
          413|             inherit modules;

       … while evaluating the attribute 'disabled'

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:412:13:

          411|           collectResults = modules: {
          412|             disabled = concatLists (catAttrs "disabled" modules);
             |             ^
          413|             inherit modules;

       … while evaluating the attribute 'disabled'

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:412:13:

          411|           collectResults = modules: {
          412|             disabled = concatLists (catAttrs "disabled" modules);
             |             ^
          413|             inherit modules;

       … while evaluating anonymous lambda

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:434:31:

          433|           disabledKeys = map moduleKey disabled;
          434|           keyFilter = filter (attrs: ! elem attrs.key disabledKeys);
             |                               ^
          435|         in map (attrs: attrs.module) (builtins.genericClosure {

       … from call site

       … while evaluating 'filterModules'

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:430:36:

          429|       # modules recursively. It returns the final list of unique-by-key modules
          430|       filterModules = modulesPath: { disabled, modules }:
             |                                    ^
          431|         let

       … from call site

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:441:7:

          440|     in modulesPath: initialModules: args:
          441|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);
             |       ^
          442|

       … while evaluating anonymous lambda

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:440:37:

          439|
          440|     in modulesPath: initialModules: args:
             |                                     ^
          441|       filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);

       … from call site

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:284:25:

          283|       merged =
          284|         let collected = collectModules
             |                         ^
          285|           (specialArgs.modulesPath or "")

       … while evaluating 'reverseList'

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/lists.nix:394:17:

          393|   */
          394|   reverseList = xs:
             |                 ^
          395|     let l = length xs; in genList (n: elemAt xs (l - n - 1)) l;

       … from call site

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:288:33:

          287|           ({ inherit lib options config specialArgs; } // specialArgs);
          288|         in mergeModules prefix (reverseList collected);
             |                                 ^
          289|

       … while evaluating 'byName'

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:555:25:

          554|       */
          555|       byName = attr: f: modules:
             |                         ^
          556|         zipAttrsWith (n: concatLists)

       … from call site

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:572:21:

          571|       # an attrset 'name' => list of submodules that declare ‘name’.
          572|       declsByName = byName "options" (module: option:
             |                     ^
          573|           [{ inherit (module) _file; options = option; }]

       … while evaluating the attribute 'matchedOptions'

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:651:14:

          650|     in {
          651|       inherit matchedOptions;
             |              ^
          652|

       … while evaluating 'mapAttrsRecursiveCond'

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/attrsets.nix:393:36:

          392|   */
          393|   mapAttrsRecursiveCond = cond: f: set:
             |                                    ^
          394|     let

       … from call site

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:296:28:

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

       … while evaluating the attribute 'nodes.powerbook.config.deployment'

       at /nix/store/zxdl289v07dxcsvwnb202sgmrv97b0nf-source/lib/modules.nix:363:9:

          362|         options = checked options;
          363|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          364|         _module = checked (config._module);
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ChildFailure { exit_code: 1 }', src/command/apply_local.rs:109:74
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
06:15:11
@cw:kernelpanic.cafeChinchilla Washington
In reply to @zhaofeng:zhaofeng.li
For those extra arguments, you either need to pass them in with _module.args or meta.specialArgs
You answered my next question before I was even able ot ask it, hah
06:15:36
@cw:kernelpanic.cafeChinchilla Washingtonthat fixed it... but why?06:16:54
@cw:kernelpanic.cafeChinchilla WashingtonNow I'm on to 'home manager never worked on 22.05' but that's out of colmena territory06:17:33
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @cw:kernelpanic.cafe
Now I'm on to 'home manager never worked on 22.05' but that's out of colmena territory
For 22.05, you need to use the release-22.05 branch of home-manager
06:20:59
@cw:kernelpanic.cafeChinchilla Washingtonoh shit for real?06:21:20
@cw:kernelpanic.cafeChinchilla Washington-___-06:21:29
@cw:kernelpanic.cafeChinchilla WashingtonI skipped a whole release because I couldn't figure that shit out06:21:46
@zhaofeng:zhaofeng.liZhaofeng LiThough the problem I often encountered is not updating the master home-manager input for too long and it no longer worked with the latest nixos-unstable06:21:58
@cw:kernelpanic.cafeChinchilla WashingtonHow can I target a branch w/ a flake?06:22:31
@zhaofeng:zhaofeng.liZhaofeng Li github:nix-community/home-manager/release-22.05 06:22:58
@cw:kernelpanic.cafeChinchilla Washingtonthat's stupid simple06:23:06
@zhaofeng:zhaofeng.liZhaofeng Li So you were pinning to master for nixpkgs? 06:23:27
@cw:kernelpanic.cafeChinchilla Washington nixos-unstable 06:24:28
@cw:kernelpanic.cafeChinchilla WashingtonMigrating 10k+ line config to flakes has been brutal to me. Nixos is already black magic enough on it's own06:29:47
@cw:kernelpanic.cafeChinchilla Washingtonkinda got my laptop working, but I didn't want to pin shared systems to unstable06:30:31
@cw:kernelpanic.cafeChinchilla Washington Thanks again Zhaofeng Li , I'm building AND you fixed my hm issue 06:51:21
@omlet:matrix.org@omlet:matrix.org left the room.09:30:10
21 Nov 2022
@whentze:matrix.orgWanja Hentze
In reply to @cw:kernelpanic.cafe
Migrating 10k+ line config to flakes has been brutal to me. Nixos is already black magic enough on it's own
reading this makes me a bit glad I use only vanilla NixOS with no home-manager or flakes for now 😅
11:44:43
@buckley310:matrix.orgBuckleyreading this makes me a bit glad I switched to flakes early 🤣14:42:43
22 Nov 2022
@rttti:matrix.org@rttti:matrix.org joined the room.23:23:51
24 Nov 2022
@ask-yourself:matrix.org@ask-yourself:matrix.org joined the room.17:51:26
@ask-yourself:matrix.org@ask-yourself:matrix.org

Hey there, I was redirected here after asking in Matrix Disocrd #general.

So I've got all my machines set up with Colmena. I can build the config for any machine locally on said machine with colmena apply-local, however I'm having trouble pushing a build from my main machine to my laptop. I've set up an ssh key, so I can ssh into my laptop with ssh isaac@localip with no password. But when I run sudo colmena apply --to laptop from my main PC, I get this:

❯ sudo colmena apply --on laptop
[sudo] password for isaac:
[INFO ] Using flake: git+file:///home/isaac/.dotfiles
[INFO ] Enumerating nodes...
[INFO ] Selected 1 out of 2 hosts.
       ❌ 4s Failed: Child process exited with error code: 1
laptop ✅ 4s Evaluated laptop
laptop ✅ 0s Built "/nix/store/klgnlk5l0cbx6yzn6xcfn6w4hbbmhp51-nixos-system-laptop-23.05pre-git"
laptop ❌ 0s Push failed: 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] Failed to push system closure to laptop - Last 5 lines of logs:
[ERROR]  created)
[ERROR]    state) Running
[ERROR]   stderr) ssh: Could not resolve hostname laptop: Name or service not known
[ERROR]   stderr) error: cannot connect to 'isaac@laptop'
[ERROR]  failure) Child process exited with error code: 1
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 1

Could anyone clarify how to fix this? My one buddy somehow got it working with SOPS but IDK really what to do.

17:56:02
@ask-yourself:matrix.org@ask-yourself:matrix.org *

Hey there, I was redirected here after asking in Matrix Discord #general.

So I've got all my machines set up with Colmena. I can build the config for any machine locally on said machine with colmena apply-local, however I'm having trouble pushing a build from my main machine to my laptop. I've set up an ssh key, so I can ssh into my laptop with ssh isaac@localip with no password. But when I run sudo colmena apply --to laptop from my main PC, I get this:

❯ sudo colmena apply --on laptop
[sudo] password for isaac:
[INFO ] Using flake: git+file:///home/isaac/.dotfiles
[INFO ] Enumerating nodes...
[INFO ] Selected 1 out of 2 hosts.
       ❌ 4s Failed: Child process exited with error code: 1
laptop ✅ 4s Evaluated laptop
laptop ✅ 0s Built "/nix/store/klgnlk5l0cbx6yzn6xcfn6w4hbbmhp51-nixos-system-laptop-23.05pre-git"
laptop ❌ 0s Push failed: 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] Failed to push system closure to laptop - Last 5 lines of logs:
[ERROR]  created)
[ERROR]    state) Running
[ERROR]   stderr) ssh: Could not resolve hostname laptop: Name or service not known
[ERROR]   stderr) error: cannot connect to 'isaac@laptop'
[ERROR]  failure) Child process exited with error code: 1
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 1

Could anyone clarify how to fix this? My one buddy somehow got it working with SOPS but IDK really what to do.

17:56:20
@ask-yourself:matrix.org@ask-yourself:matrix.orgFor reference, these are my dotfiles; and the system I'm trying to build is in ./nixos/laptop: https://gitlab.com/IsaacBrown92/dotfiles17:56:54
@linus:schreibt.jetztLinux Hackerman Ask Yourself🍉: you need to specify deployment.targetHost as an address under which it can reach the laptop 17:57:32
@linus:schreibt.jetztLinux Hackermanso one possibility would be the local IP address17:57:46
@ask-yourself:matrix.org@ask-yourself:matrix.org

So that I have tried:


      laptop = {
        deployment = {
          allowLocalDeployment = true;
          tags = ["laptop"];
          targetUser = "isaac";
          targetHost = "10.0.0.22";
        };

        imports = [
          ./nixos/laptop
          home-manager.nixosModules.home-manager
          {
            home-manager = {
              extraSpecialArgs = {
                inherit user;
              };
              useGlobalPkgs = true;
              users.${user} = {
                imports = [(import ./nixos/laptop/home-manager.nix)];
              };
              useUserPackages = true;
            };
          }
        ];
      };

But I get this:

❯ sudo colmena apply --on laptop
warning: Git tree '/home/isaac/.dotfiles' is dirty
[INFO ] Using flake: git+file:///home/isaac/.dotfiles
[INFO ] Enumerating nodes...
warning: Git tree '/home/isaac/.dotfiles' is dirty
warning: Git tree '/home/isaac/.dotfiles' is dirty
warning: Git tree '/home/isaac/.dotfiles' is dirty
[INFO ] Selected 1 out of 2 hosts.
       ❌ 5s Failed: Child process exited with error code: 1
laptop ✅ 4s Evaluated laptop
laptop ✅ 0s Built "/nix/store/klgnlk5l0cbx6yzn6xcfn6w4hbbmhp51-nixos-system-laptop-23.05pre-git"
laptop ❌ 0s Push failed: Child process exited with error code: 1
[ERROR] Failed to push system closure to laptop - Last 5 lines of logs:
[ERROR]  created)
[ERROR]    state) Running
[ERROR]   stderr) isaac@10.0.0.22: Permission denied (publickey,password,keyboard-interactive).
[ERROR]   stderr) error: cannot connect to 'isaac@10.0.0.22'
[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
18:00:31
@ask-yourself:matrix.org@ask-yourself:matrix.org It looks the the error you get when ssh is messed up, but ssh 10.0.0.22 works perfectly w/o password. 18:01:27
@NobbZ:matrix.org@NobbZ:matrix.org joined the room.18:19:22

Show newer messages


Back to Room ListRoom Version: 6