4 Feb 2022 |
Buckley | đ¤ | 17:51:08 |
Buckley | dunno | 17:51:39 |
Buckley | are you on unstable or 21.11 ? | 17:51:44 |
CRTified |
- system:
"x86_64-linux"
- host os:
Linux 5.16.2, NixOS, 22.05 (Quokka)
- multi-user?:
yes
- sandbox:
yes
- version:
nix-env (Nix) 2.6.0pre20211217_6e6e998
If it helps
| 17:51:47 |
CRTified | Unstable | 17:51:51 |
CRTified | $ nix --version
nix (Nix) 2.6.0pre20211217_6e6e998
| 17:52:12 |
Buckley | im on 21.11. i wonder if they changed something? đ¤ | 17:52:17 |
Buckley | oh im on nix 2.4 as well | 17:52:23 |
CRTified | AFAIK, extraArgs in nixpkgs.lib.nixosSystem got deprecated đ¤ | 17:52:44 |
Buckley | đ i guess i need to figure out how else to do this then | 17:53:06 |
Buckley | before 22.05 | 17:53:17 |
CRTified | I tried manually to import everything under nixosConfigurations.mailbox but in most cases, I've hit either errors of "wrong type", infinite recursion or nixpkgs.pkgs does not exist | 17:54:18 |
Buckley | did you read somewhere that the extraArgs thing got deprecated? if so ill get on solving this, since ill need to eventually anyway | 17:54:55 |
CRTified | I think I've read it somewhere | 17:55:31 |
CRTified | I'll try to find it again | 17:55:35 |
CRTified | It got really late last night đ
| 17:55:44 |
Buckley | heh | 17:56:28 |
Buckley | i like how literally a couple hours ago i said something like i dont think nixosConfigurations would break xD | 17:57:02 |
Zhaofeng Li | Looks like args and extraArgs was deprecates here:
https://github.com/NixOS/nixpkgs/pull/148315 | 17:58:29 |
Zhaofeng Li | * Looks like args and extraArgs was deprecated here:
https://github.com/NixOS/nixpkgs/pull/148315 | 17:58:52 |
Zhaofeng Li | But setting _module.args should be equivalent | 17:59:27 |
CRTified | imports = value._module.args.modules; seems promising, but as I add colmena.nixosModules.deploymentOptions to the nixosSystem modules, I now get a duplicate definition warning:
error: The option `deployment.allowLocalDeployment' in `<unknown-file>' is already declared in `/nix/store/4ba8vi60ay3b68kgspyxd7bmxbsixar1-source/flake.nix'.
| 18:05:16 |
CRTified | So it looks like I'd need to filter it in that case? đ¤ | 18:05:29 |
CRTified | Can't really filter it âšī¸ Equality of lambdas is a bit hard as a problem đ | 18:16:06 |
Jane Jasperous | I get this exactly error using extraArgs.modules | 18:31:05 |
Buckley | okay i updated my deployment stuff. https://github.com/buckley310/nixos-config/blob/master/lib/deploy.nix | 18:45:47 |
Buckley | and for reference, this is how i use it.
let
hosts = import ./hosts hardware self.nixosModule;
deploy = sconfig.lib.deploy { inherit self hosts; };
in
{
inherit (deploy) colmena;
nixosConfigurations = builtins.mapAttrs (_: nixpkgs.lib.nixosSystem) hosts;
}
| 18:47:45 |
Buckley | i had played with that strategy before, so i had it ready, just wasnt using it. basically instead of colmena consuming nixosConfigurations, just build my hosts as plain configs, and both nixosConfigurations and colmena consume that | 18:49:27 |
Buckley | ./hosts looks like
hardware: nixosModule:
with hardware;
let
sys = system: mods: {
inherit system;
modules = [ nixosModule ] ++ mods;
};
in
{
host1 = sys "x86_64-linux" [ ./host1 ];
}
| 18:50:21 |
Buckley | * ./hosts/default.nix looks like
hardware: nixosModule:
with hardware;
let
sys = system: mods: {
inherit system;
modules = [ nixosModule ] ++ mods;
};
in
{
host1 = sys "x86_64-linux" [ ./host1 ];
}
| 18:50:31 |