| 21 Oct 2022 |
@yuka:yuka.dev | * I also generate a groups module arg:
{ lib, ... }@args:
{
_module.args.groups = let
tagNames = lib.unique (
lib.concatLists (
lib.mapAttrsToList (
name: host: host.config.deployment.tags
) args.nodes
)
);
in lib.genAttrs tagNames (
tagName: lib.filter (
host: lib.elem tagName host.config.deployment.tags
) (
lib.attrValues args.nodes
)
);
}
| 11:55:52 |
@yuka:yuka.dev | makes some of the modules way cleaner | 11:56:02 |
Wanja Hentze | this just makes one group per tag, right? | 11:56:32 |
@yuka:yuka.dev | yes | 11:56:43 |
@yuka:yuka.dev | like the wireguard module just adds deployment.tags = [ "wireguard" ]; and then accesses groups.wireguard to get all the hosts that have the module enabled (it should mesh to) | 11:57:13 |
Wanja Hentze | I might steal this ┏ʕ •ᴥ•ʔ┛ | 11:58:52 |
@yuka:yuka.dev | feel free to | 11:59:07 |
@yuka:yuka.dev | but also I'll try to get my module based hive thing into shape and make a repo somewhere | 11:59:36 |
@yuka:yuka.dev | not sure really what modules would work better on that layer | 11:59:50 |
@yuka:yuka.dev | Wanja Hentze: do you have an idea for a name for the module system hive thingy? | 12:37:56 |
Wanja Hentze | 😬 | 12:38:08 |
@yuka:yuka.dev | coming up with names is hard | 12:38:14 |
Wanja Hentze | oh no, my sole weakness | 12:38:18 |
@yuka:yuka.dev | but I need a name to publish it in a repo | 12:38:22 |
@yuka:yuka.dev | currently it is hive-modules/yuka-hive.nix | 12:38:34 |
@yuka:yuka.dev | to distinguish it from a colmena hive | 12:38:42 |
@yuka:yuka.dev | but don't really want to keep my nickname in there if others will use it | 12:39:02 |
@yuka:yuka.dev | so I need something else to distinguish it from colmena hive, or another name entirely | 12:39:17 |
Wanja Hentze | "colmena" is spanish for "hive", so maybe another word for "hive" from a different language? 🤔 | 12:39:47 |
@yuka:yuka.dev | or something very boring, like module-hive? | 12:40:07 |
Wanja Hentze | use the portugese "colmeia" which is sure to absolutely not result in any confusion ever :D | 12:40:22 |
@yuka:yuka.dev | mkNixosConfigurations 😬 | 12:40:23 |
Wanja Hentze | what's the plural of nixos if nixos was a latin word? 🤔 | 12:41:27 |
@yuka:yuka.dev | nixa | 12:41:36 |
Wanja Hentze | wait, -os is greek | 12:41:46 |
Wanja Hentze | usually | 12:41:48 |
@yuka:yuka.dev | yeah, -os wouldn't be latin | 12:41:59 |
@yuka:yuka.dev | then it would be nixum or nixus | 12:42:03 |
Wanja Hentze | "os" is latin for "mouth" and its plural is "ossa" | 12:42:33 |
@yuka:yuka.dev | anyways | 12:42:34 |