!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
16 Feb 2024
@hexa:lossy.networkhexaand like that 😄 14:21:12
@hexa:lossy.networkhexa fails with localSystem = system the same 🙂 14:21:47
@raitobezarius:matrix.orgraitobezariusat this point, you want to confirm one thing14:24:17
@raitobezarius:matrix.orgraitobezariuscan you evaluate your system toplevel without colmena?14:24:23
@raitobezarius:matrix.orgraitobezarius as long as you are not using colmena specific nixos modules, you can just do pkgs.nixos [ (import ./machines/configuration.nix) ] 14:24:58
@hexa:lossy.networkhexadeployment.keys14:26:48
@hexa:lossy.networkhexaagenix soon-ish14:26:59
@raitobezarius:matrix.orgraitobezariusyou can inject colmena specific modules too in that list14:28:00
@raitobezarius:matrix.orgraitobezariusand that will fix the thing14:28:03
@raitobezarius:matrix.orgraitobezariushere's an example on how I do it with flake:14:28:08
@raitobezarius:matrix.orgraitobezariushttps://git.newtype.fr/newtype/newtype-org-configurations/src/branch/main/configurations.nix#L19-L2114:28:38
20 Feb 2024
@sofo:matrix.org@sofo:matrix.org changed their display name from Sofi to Sofie.07:39:10
@sofo:matrix.org@sofo:matrix.org changed their profile picture.14:39:01
@sofo:matrix.org@sofo:matrix.org changed their profile picture.14:41:30
@sofo:matrix.org@sofo:matrix.org changed their profile picture.14:42:42
@sofo:matrix.org@sofo:matrix.org changed their profile picture.14:44:01
22 Feb 2024
@raitobezarius:matrix.orgraitobezarius

Zhaofeng Li: I'm planning to perform a big change in my fork of colmena, i.e. to introduce ways to configure flavors of systems, e.g. NixOS systems, Liminix systems, etc.

My intuition is that all that colmena really care about is NixOS-style mechanisms to copy closures to target system (if needed) and activate the new configuration, with that in mind, I am planning to introduce configuration attribute sets to influence how eval.nix works and which modules does it pass, which activation script will it use and introduce things like nixosConfigurations, liminixConfigurations in the top-level of the hive.

I am aware this is an intrusive change so I was planning to do it in my own fork of colmena and make a new tool out of this which will not be named colmena, I wanted to check with you if you were not interested into the idea (and if it could not make upstream). WDYT?

16:35:36
@raitobezarius:matrix.orgraitobezarius(To be precise, I'm adding support for Liminix systems and a certain framework to manipulate NETCONF-based appliances)16:36:06
@zhaofeng:zhaofeng.liZhaofeng Li I'm actually interested in a deploy-rs-style "profile" system where the evaluator and deployer are pluggable 16:37:40
@zhaofeng:zhaofeng.liZhaofeng Li My main usecase would be to deploy nix-darwin 16:38:11
@zhaofeng:zhaofeng.liZhaofeng Li Been thinking about doing this for a while, haven't got the time yet 16:38:43
@raitobezarius:matrix.orgraitobezariusI think my proposal is a generalization of that because for example for NETCONF switches, the concept of profile is virtual16:43:29
@raitobezarius:matrix.orgraitobezariusBut yeah16:43:31
@zhaofeng:zhaofeng.liZhaofeng Li Regarding top-level attributes, my plan was to make targets of different types available as nodes and allow them to cross-reference each other's configs like what we have currently 16:53:25
@raitobezarius:matrix.orgraitobezariusnot sure I follow exactly16:56:20
@raitobezarius:matrix.orgraitobezarius is your proposal to have deployment.deploymentType = "another-type"; ? 16:56:29
@raitobezarius:matrix.orgraitobezariusif so, how do you dynamically switch the set of modules based on the type?16:56:39
@raitobezarius:matrix.orgraitobezariuscross reference becomes a bit harder if you try to mix different systems with different NixOS modules, no?16:57:03
@ma27:nicht-so.sexyma27 fwiw what I've effectively done in my to-be-published solution is to expose nodes.<name>.os & nodes.<name>.configuration (I wanted to have deployment-wide modules, i.e. modules that are able to manipulate many machines). The latter's option type is generated by a function that takes a merge function and provides a type for that. The "merge function" can be something like nixos.lib.nixosSystem (or the nix-darwin equivalent), depending on what os looks like. The structure in nodes isn't mapped to config.system.build.toplevel, but left as-is to allow any part of any node to be evaluated with nix eval. Another module (when using it with flake-parts) fills nixosConfigurations/etc. with config.system.build.toplevel to allow nixos-rebuild to work with that. 17:12:14
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @raitobezarius:matrix.org
is your proposal to have deployment.deploymentType = "another-type"; ?
It'd would be defined inside each node and doesn't require invoking the module system to get. There can be a fallback to the NixOS evaluator if the node isn't an attrset or doesn't contain `type`
17:15:50

Show newer messages


Back to Room ListRoom Version: 6