!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
19 Jun 2023
@zhaofeng:zhaofeng.liZhaofeng LiAha, there is something wonky with the path-to-flake resolution05:53:10
@rendakuenthusiast:imperishable.namerendakuenthusiast 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:zhaofeng.liZhaofeng 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:zhaofeng.liZhaofeng 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.namerendakuenthusiastand so this requires me to pass in --impure and I think those aren't getting tracked in the flake.lock file05:54:19
@rendakuenthusiast:imperishable.namerendakuenthusiast hm I'll try -f ./flake.nix 05:54:28
@rendakuenthusiast:imperishable.namerendakuenthusiastseems 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 all05:55:03
@rendakuenthusiast:imperishable.namerendakuenthusiastanyway, 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 them05:55:41
@zhaofeng:zhaofeng.liZhaofeng Li I usually just do meta.specialArgs = inputs so any config module can access all flake inputs 05:56:29
@rendakuenthusiast:imperishable.namerendakuenthusiastoh hm05:56:51
@rendakuenthusiast:imperishable.namerendakuenthusiast so, if I set that, then I should be able to access {config, pkgs, inputs, ...}: in any submodule I declare? 05:57:28
@zhaofeng:zhaofeng.liZhaofeng Liyeah05:57:42
@zhaofeng:zhaofeng.liZhaofeng Li

like

{ pkgs, inputs, ... }:
{
  imports = [ inputs.home-manager.nixosModules.default ];
}
05:57:49
@rendakuenthusiast:imperishable.namerendakuenthusiastit would be great if you could put that example here: https://colmena.cli.rs/unstable/reference/meta.html#specialargs05:57:59
@rendakuenthusiast:imperishable.namerendakuenthusiastit's not obvious to me what a "special arg" is, even if I'm reading that documentation05:58:13
@rendakuenthusiast:imperishable.namerendakuenthusiast also an example of how to use nodeSpecialArgs, although I don't think I personally need that 05:59:15
@zhaofeng:zhaofeng.liZhaofeng 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.namerendakuenthusiast error: syntax error, unexpected INHERIT 06:00:37
@rendakuenthusiast:imperishable.namerendakuenthusiastoh wait need to wrap it in a set06:00:53
@zhaofeng:zhaofeng.liZhaofeng Li otherwise it will look like { pkgs, config, home-manager, ... } etc, but might be fine depending on what you like 06:00:58
@rendakuenthusiast:imperishable.namerendakuenthusiast although now it objects to specialArgs = { inherit inputs }; 06:01:16
@rendakuenthusiast:imperishable.namerendakuenthusiaster, forgot the closing ;06:01:30
@rendakuenthusiast:imperishable.namerendakuenthusiast inputs is undefined within the body of the outputs fn 06:01:54
@rendakuenthusiast:imperishable.namerendakuenthusiast does it need to be self.inputs? 06:02:05
@rendakuenthusiast:imperishable.namerendakuenthusiastor 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 flakes06:02:29
@zhaofeng:zhaofeng.liZhaofeng Li Ah, you do something like outputs = { self, nixpkgs, ... } @ inputs: { ... } 06:02:30
@zhaofeng:zhaofeng.liZhaofeng Li The @ inputs will bind the entire set as inputs 06:02:46
@rendakuenthusiast:imperishable.namerendakuenthusiast @ syntax works on either side of the fn input set, right? 06:02:52
@zhaofeng:zhaofeng.liZhaofeng Liyes06:02:57
@rendakuenthusiast:imperishable.namerendakuenthusiastI'm not sure why they needed to implmenet it both ways06:03:17

Show newer messages


Back to Room ListRoom Version: 6