!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
4 Feb 2022
@buckley310:matrix.orgBuckley🤔17:51:08
@buckley310:matrix.orgBuckleydunno17:51:39
@buckley310:matrix.orgBuckleyare you on unstable or 21.11 ?17:51:44
@schnecfk:ruhr-uni-bochum.deCRTified
  • 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
@schnecfk:ruhr-uni-bochum.deCRTifiedUnstable17:51:51
@schnecfk:ruhr-uni-bochum.deCRTified
$ nix --version
nix (Nix) 2.6.0pre20211217_6e6e998
17:52:12
@buckley310:matrix.orgBuckleyim on 21.11. i wonder if they changed something? 🤔17:52:17
@buckley310:matrix.orgBuckleyoh im on nix 2.4 as well17:52:23
@schnecfk:ruhr-uni-bochum.deCRTified AFAIK, extraArgs in nixpkgs.lib.nixosSystem got deprecated 🤔 17:52:44
@buckley310:matrix.orgBuckley🎉 i guess i need to figure out how else to do this then17:53:06
@buckley310:matrix.orgBuckleybefore 22.0517:53:17
@schnecfk:ruhr-uni-bochum.deCRTified 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
@buckley310:matrix.orgBuckleydid you read somewhere that the extraArgs thing got deprecated? if so ill get on solving this, since ill need to eventually anyway17:54:55
@schnecfk:ruhr-uni-bochum.deCRTified I think I've read it somewhere 17:55:31
@schnecfk:ruhr-uni-bochum.deCRTifiedI'll try to find it again17:55:35
@schnecfk:ruhr-uni-bochum.deCRTifiedIt got really late last night 😅17:55:44
@buckley310:matrix.orgBuckleyheh17:56:28
@buckley310:matrix.orgBuckleyi like how literally a couple hours ago i said something like i dont think nixosConfigurations would break xD17:57:02
@zhaofeng:zhaofeng.liZhaofeng Li

Looks like args and extraArgs was deprecates here:

https://github.com/NixOS/nixpkgs/pull/148315

17:58:29
@zhaofeng:zhaofeng.liZhaofeng Li* Looks like args and extraArgs was deprecated here: https://github.com/NixOS/nixpkgs/pull/14831517:58:52
@zhaofeng:zhaofeng.liZhaofeng LiBut setting _module.args should be equivalent17:59:27
@schnecfk:ruhr-uni-bochum.deCRTified

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
@schnecfk:ruhr-uni-bochum.deCRTifiedSo it looks like I'd need to filter it in that case? 🤔18:05:29
@schnecfk:ruhr-uni-bochum.deCRTifiedCan't really filter it â˜šī¸ Equality of lambdas is a bit hard as a problem 😀18:16:06
@janejasperous:one.ems.hostJane JasperousI get this exactly error using extraArgs.modules18:31:05
@buckley310:matrix.orgBuckleyokay i updated my deployment stuff. https://github.com/buckley310/nixos-config/blob/master/lib/deploy.nix18:45:47
@buckley310:matrix.orgBuckley

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
@buckley310:matrix.orgBuckley 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
@buckley310:matrix.orgBuckley

./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
@buckley310:matrix.orgBuckley *

./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

There are no newer messages yet.


Back to Room ListRoom Version: 6