| 19 Jun 2023 |
@rendakuenthusiast:imperishable.name | okay it seems that if I do pass -f flake.nix as an argument, colmena fails with the error message: error: '' is not a valid URL | 05:34:04 |
@rendakuenthusiast:imperishable.name | which is very confusing | 05:34:07 |
@rendakuenthusiast:imperishable.name | but if I omit that it seems to work fine | 05:34:13 |
Zhaofeng Li | Interesting, what does nix flake metadata --json ./flake.nix | jq show? | 05:37:43 |
Zhaofeng Li | Specifically, what's in originalUrl and resolveUrl? | 05:38:04 |
Zhaofeng Li | Also is flake.nix tracked by git? You need to git add flake.nix flake.lock | 05:38:37 |
@rendakuenthusiast:imperishable.name | @Zhaofeng Li my colmena config was previously being tracked in git, I'm currently live-editing files in that repo | 05:48:19 |
@rendakuenthusiast:imperishable.name | I think I did add flake.nix and flake.lock but their current state was different than what was checked in | 05:48:30 |
Zhaofeng Li | That should be fine, it should work as long as they are tracked (either clean or dirty) | 05:49:08 |
@rendakuenthusiast:imperishable.name | there is no resolveUrl; the originalUrl is a "git+file:///path/to/my/colmena/repo" | 05:49:40 |
@rendakuenthusiast:imperishable.name | which is just a dir on my system | 05:49:53 |
Zhaofeng Li | Sorry, should be resolvedUrl with a d | 05:50:19 |
Zhaofeng Li | Also not there? | 05:50:28 |
@rendakuenthusiast:imperishable.name | no, it's exactly the same path as originalUrl | 05:50:37 |
Zhaofeng Li | In reply to @rendakuenthusiast:imperishable.name no, it's exactly the same path as originalUrl Hmm, then it should be correct | 05:50:54 |
@rendakuenthusiast:imperishable.name | well the deploy works now, as long as I don't put -f flake.nix | 05:51:18 |
@rendakuenthusiast:imperishable.name | I was more mentioning that b/c the error message was confusing | 05:51:25 |
@rendakuenthusiast:imperishable.name | anyway, I have a new question: currently I have my colmena config set up such that outputs.colmena.<system-name> = { deployment.targetHost = <url>; imports = [./system-name.nix]; } | 05:52:37 |
@rendakuenthusiast:imperishable.name | so that each machine's configuration is in its own file in this repo and I don't have one giant flake.nix (or previously default.nix) | 05:52:53 |
Zhaofeng Li | Aha, there is something wonky with the path-to-flake resolution | 05:53:10 |
@rendakuenthusiast:imperishable.name | but some of those imported configuration modules are themselves importing a local flake with bulitins.getFlake /absolute/path/to/another/flake/on/my/system | 05:53:34 |
Zhaofeng Li | -f ./flake.nix works but -f flake.nix doesn't - probably a behavior change on Nix but it's still Colmena's fault | 05:53:47 |
Zhaofeng Li | * -f ./flake.nix works but -f flake.nix doesn't - probably a behavior change in Nix but it's still Colmena's fault | 05:53:52 |
@rendakuenthusiast:imperishable.name | and so this requires me to pass in --impure and I think those aren't getting tracked in the flake.lock file | 05:54:19 |
@rendakuenthusiast:imperishable.name | hm I'll try -f ./flake.nix | 05:54:28 |
@rendakuenthusiast:imperishable.name | seems like that works fine. although of course if I stick to the flake.nix naming convention, which I have no reason to break from anyway, I don't need -f at all | 05:55:03 |
@rendakuenthusiast:imperishable.name | anyway, I'd like to be able to define a few more external flakes in flake.nix, and then pass them as arguments to the specific submodles that need them | 05:55:41 |
Zhaofeng Li | I usually just do meta.specialArgs = inputs so any config module can access all flake inputs | 05:56:29 |
@rendakuenthusiast:imperishable.name | oh hm | 05:56:51 |
@rendakuenthusiast:imperishable.name | so, if I set that, then I should be able to access {config, pkgs, inputs, ...}: in any submodule I declare? | 05:57:28 |