| 25 Jan 2022 |
Buckley | In reply to @buckley310:matrix.org
the stub:
colmena =
{ meta.nixpkgs = nixpkgs.legacyPackages."x86_64-linux"; } //
builtins.mapAttrs
(name: value: {
nixpkgs.system = value.config.nixpkgs.system;
imports = value.extraArgs.modules ++ [
({ config, ... }: { inherit (config.sconfig) deployment; })
];
})
(nixosConfigurations);
FWIW, my colmena machines have the correct nixpkgs info instead of the pre-git thing, because i build them in nixosConfigurations and then shim them into colmena | 15:45:59 |
Buckley | $ nixos-version
21.11.20211229.8588b14 (Porcupine)
| 15:46:43 |
Linux Hackerman | In reply to @buckley310:matrix.org
the stub:
colmena =
{ meta.nixpkgs = nixpkgs.legacyPackages."x86_64-linux"; } //
builtins.mapAttrs
(name: value: {
nixpkgs.system = value.config.nixpkgs.system;
imports = value.extraArgs.modules ++ [
({ config, ... }: { inherit (config.sconfig) deployment; })
];
})
(nixosConfigurations);
hm, why do you set nixpkgs.system again? Shouldn't imports already take care of that? | 17:41:43 |
Buckley | i originally thought so, but if i remove that line my pi doesnt deploy right | 17:42:22 |
Linux Hackerman | I also don't see how that will play along with use of meta.nodeNixpkgs | 17:42:25 |
Linux Hackerman | that is, if I use meta.nodeNixpkgs it will deploy using the nixpkgs I want it to, but have an incorrect version string | 17:44:49 |
[0x4A6F] | Linux Hackerman: something along this in flake outputs?
colmena.defaults = {
system.nixos.version = "nixos-${nixpkgs.shortRev}";
};
| 17:45:10 |
Linux Hackerman | In reply to @linus.heckemann:matrix.mayflower.de that is, if I use meta.nodeNixpkgs it will deploy using the nixpkgs I want it to, but have an incorrect version string [0x4A6F]: that also has ^ this problem | 17:45:36 |
Buckley | In reply to @linus.heckemann:matrix.mayflower.de that is, if I use meta.nodeNixpkgs it will deploy using the nixpkgs I want it to, but have an incorrect version string not sure. i dont use meta.nodePackages. | 17:46:04 |
Buckley | In reply to @linus.heckemann:matrix.mayflower.de that is, if I use meta.nodeNixpkgs it will deploy using the nixpkgs I want it to, but have an incorrect version string * not sure. i dont use meta.nodeNixpkgs | 17:46:42 |
Zhaofeng Li | In reply to @linus.heckemann:matrix.mayflower.de that is, if I use meta.nodeNixpkgs it will deploy using the nixpkgs I want it to, but have an incorrect version string Hmm, interesting. Do you have a minimal repro? Or I can try doing it sometime today | 18:26:09 |
Zhaofeng Li | In reply to @linus.heckemann:matrix.mayflower.de Is there a way to pass the flake inputs on to all machine configs? I'd like to do things like imports = [ "${inputs.nixos-mailserver}/default.nix" ]; in my machine configs. You can pass the inputs using either meta.specialArgs.inputs = inputs; or _module.args.inputs = inputs; in a node config | 18:27:23 |
Zhaofeng Li | Then inputs will be available as a NixOS module parameter. You can also go the overlays way, though. | 18:28:09 |
Linux Hackerman | In reply to @zhaofeng:zhaofeng.li You can pass the inputs using either meta.specialArgs.inputs = inputs; or _module.args.inputs = inputs; in a node config I tried the latter, it resulted in infinite recursion in combination with imports = [ inputs.nixos-mailserver ]; | 19:36:43 |