!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
4 Feb 2022
@zhaofeng:zhaofeng.liZhaofeng Li It occurs in nixos-unstable with sandboxed documentation builds enabled, where documentation.nix uses modulesPath to strip off the prefixes of module paths 20:35:20
@aanderse:nixos.devaanderseshould i backport 0.2.1 to nixpkgs stable for you? 😄20:35:32
@aanderse:nixos.devaanderseoh20:35:58
@aanderse:nixos.devaandersenevermind... i see now20:36:02
@aanderse:nixos.devaanderseha20:36:03
@aanderse:nixos.devaanderse thank you so much Zhaofeng Li ! 20:36:18
@hexa:lossy.networkhexai'm too lazy to migrate from morph 😓20:37:10
@zhaofeng:zhaofeng.liZhaofeng Li Colmena should hopefully just work with your existing morph configs 20:38:43
@zhaofeng:zhaofeng.liZhaofeng Liyou do have to change how you pin nixpkgs, though20:39:05
@zhaofeng:zhaofeng.liZhaofeng Li * you do have to change how you pin nixpkgs, though: https://zhaofengli.github.io/colmena/unstable/tutorial/migration.html20:39:27
@aanderse:nixos.devaanderse hexa: i haven't used morph ... but i can't say enough good things about colmena
this project is a breath of fresh air after having to deal with nixops issues (no stable release on python3) for a while
20:39:33
@hexa:lossy.networkhexawell … nixops is on another level 😀20:40:14
@aanderse:nixos.devaanderse i don't mean to overwhelm Zhaofeng Li with compliments... but what a wonderfully simple tool to use ❤️ 20:40:16
@hexa:lossy.networkhexamorph just seems to be … enough for the maintainers20:40:23
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @hexa:lossy.network
well … nixops is on another level 😀
Yes indeed, NixOps does much more than morph/colmena aims to do with the IaaS features
20:43:20
@buckley310:matrix.orgBuckleyi moved from morph. its missing some creature comforts 🤔20:41:48
@zhaofeng:zhaofeng.liZhaofeng LiPeople have been asking about provisioning in Colmena, and that's better handled by tools that are focused on provisioning (e.g., terraform) than Colmena itself: https://github.com/zhaofengli/colmena/issues/4220:44:57
@zhaofeng:zhaofeng.liZhaofeng LiOne example is https://github.com/justinas/nixos-ha-kubernetes which uses terraform's state from a Colmena configuration20:45:25
@hexa:lossy.networkhexaI don't expect provisioning20:46:44
@hexa:lossy.networkhexasounds very much like scope creep20:47:21
@buckley310:matrix.orgBuckleyyeah, provisioning seems inherently incompatible with statelessness20:47:19
@schnecfk:ruhr-uni-bochum.deCRTified Buckley: I have found a decent solution, I think 20:47:56
@schnecfk:ruhr-uni-bochum.deCRTified eval-config has an additional parameter extraModules https://github.com/NixOS/nixpkgs/blob/a0ad8dcd354c67f084511e4ae78a27af83df95fd/nixos/lib/eval-config.nix#L28 - That allows you to add your usual modules to modules, and colmena.nixosModules.deploymentOptions to extraModules 20:48:45
@schnecfk:ruhr-uni-bochum.deCRTified

So in general it looks like this for me now:

[---SNIP---]
      sys = system: mods:
        nixpkgs.lib.nixosSystem {

          inherit system;
          
          specialArgs = {inherit inputs; } ;

          extraModules = [
            colmena.nixosModules.deploymentOptions
          ];
          
          modules = [
            self.nixosModule
            home-manager.nixosModules.home-manager

            ./common
          ] ++ mods;
        };

    in rec {

      colmena = {
        meta = {
          description = "My personal machines";
          nixpkgs = import nixpkgs {
            system = "x86_64-linux";
            overlays = [ nur.overlay ];
          };
        };

      } // builtins.mapAttrs (name: value: {
        nixpkgs.system = value.config.nixpkgs.system;
        imports = value._module.args.modules;
      }) (self.nixosConfigurations);
[---SNAP---]
20:49:46
@buckley310:matrix.orgBuckleyi think my ideal scenario would be for nixosConfigurations to import the colmena module explicitly, and then nxiosConfigurations to be read directly by colmena... though i do not claim this to be an easy lift :D20:51:41
@buckley310:matrix.orgBuckleyive poked around the codebase a bit in hopes of writing some PRs but i just haven't put enough time into the rust stuff to figure it out yet20:52:41
@schnecfk:ruhr-uni-bochum.deCRTified
In reply to @buckley310:matrix.org
i think my ideal scenario would be for nixosConfigurations to import the colmena module explicitly, and then nxiosConfigurations to be read directly by colmena... though i do not claim this to be an easy lift :D
Yes, that would be the "best case", but I think I'm happy with my shim-method now 🙂
20:56:18
@buckley310:matrix.orgBuckleyshims for days 😎21:00:59
@github:maunium.net@github:maunium.net [zhaofengli/colmena] cole-h opened issue #54: Don't require meta.nixpkgs if meta.nodeNixpkgs is set for the target host(s)

I think it's a little weird to require nixpkgs to be set (because it requires a system set which may change at any point, depending on where you're deploying from). Sure, right now, I may be using x86_64-linux, but I may want to use aarch64-linux or some other arch at any time.

I would expect, if all of the target hosts have a matching nodeNixpkgs entry, that meta.nixpkgs wouldn't be required.

Even better, if it was combined with a deployment.nixpkgs option that replaces the meta.nodeNixpkgs option.

I may be able to work on this, if this is desired by more than just me.

23:48:40
@github:maunium.net@github:maunium.net [zhaofengli/colmena] cole-h opened issue #55: Move meta.nodeNixpkgs to deployment.nixpkgs inside the node config

IMHO, it makes more sense to configure the used nixpkgs inside of the node's config, instead of in the meta attrset.

23:56:28

Show newer messages


Back to Room ListRoom Version: 6