| 19 Jun 2023 |
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 |
Zhaofeng Li | yeah | 05:57:42 |
Zhaofeng Li | like
{ pkgs, inputs, ... }:
{
imports = [ inputs.home-manager.nixosModules.default ];
}
| 05:57:49 |
@rendakuenthusiast:imperishable.name | it would be great if you could put that example here: https://colmena.cli.rs/unstable/reference/meta.html#specialargs | 05:57:59 |
@rendakuenthusiast:imperishable.name | it's not obvious to me what a "special arg" is, even if I'm reading that documentation | 05:58:13 |
@rendakuenthusiast:imperishable.name | also an example of how to use nodeSpecialArgs, although I don't think I personally need that | 05:59:15 |
Zhaofeng Li | In reply to @zhaofeng:zhaofeng.li I usually just do meta.specialArgs = inputs so any config module can access all flake inputs Wait oops, should be specialArgs = { inherit inputs; }; | 06:00:08 |
@rendakuenthusiast:imperishable.name | error: syntax error, unexpected INHERIT | 06:00:37 |
@rendakuenthusiast:imperishable.name | oh wait need to wrap it in a set | 06:00:53 |
Zhaofeng Li | otherwise it will look like { pkgs, config, home-manager, ... } etc, but might be fine depending on what you like | 06:00:58 |