| 19 Jun 2023 |
rendakuenthusiast | 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 | it would be great if you could put that example here: https://colmena.cli.rs/unstable/reference/meta.html#specialargs | 05:57:59 |
rendakuenthusiast | it's not obvious to me what a "special arg" is, even if I'm reading that documentation | 05:58:13 |
rendakuenthusiast | 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 | error: syntax error, unexpected INHERIT | 06:00:37 |
rendakuenthusiast | 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 |
rendakuenthusiast | although now it objects to specialArgs = { inherit inputs }; | 06:01:16 |
rendakuenthusiast | er, forgot the closing ; | 06:01:30 |
rendakuenthusiast | inputs is undefined within the body of the outputs fn | 06:01:54 |
rendakuenthusiast | does it need to be self.inputs? | 06:02:05 |
rendakuenthusiast | or I guess I could just pass in the flake I care about in the outputs fn and then pass that as a special arg, I only need 2 or 3 flakes | 06:02:29 |
Zhaofeng Li | Ah, you do something like outputs = { self, nixpkgs, ... } @ inputs: { ... } | 06:02:30 |
Zhaofeng Li | The @ inputs will bind the entire set as inputs | 06:02:46 |
rendakuenthusiast | @ syntax works on either side of the fn input set, right? | 06:02:52 |
Zhaofeng Li | yes | 06:02:57 |
rendakuenthusiast | I'm not sure why they needed to implmenet it both ways | 06:03:17 |
rendakuenthusiast | anyway that seems to work | 06:03:19 |
rendakuenthusiast | and that did update my flake.lock | 06:03:35 |
rendakuenthusiast | with actually kind of a lot of stuff. I set up that flake I'm importing myself, like two days ago, I may not have done it correctly | 06:04:23 |
rendakuenthusiast | but in any case I can deploy | 06:04:25 |
rendakuenthusiast | thanks for your help! | 06:04:29 |
| 22 Jun 2023 |
| @h4636oh:matrix.org joined the room. | 02:47:16 |