Compare commits

...

7 Commits

2 changed files with 26 additions and 5 deletions

View File

@@ -1,4 +1,9 @@
{ ... }: {
lib,
clanLib,
directory,
...
}:
{ {
_class = "clan.service"; _class = "clan.service";
manifest.name = "clan-core/mycelium"; manifest.name = "clan-core/mycelium";
@@ -30,8 +35,24 @@
}; };
perInstance = perInstance =
{ settings, ... }:
{ {
settings,
roles,
...
}:
{
exports.networking = {
peers = lib.mapAttrs (name: _machine: {
host.plain = clanLib.vars.getPublicValue {
machine = name;
generator = "mycelium";
file = "ip";
flake = directory;
};
}) roles.peer.machines;
};
nixosModule = nixosModule =
{ {
config, config,

6
devFlake/flake.lock generated
View File

@@ -105,11 +105,11 @@
}, },
"nixpkgs-dev": { "nixpkgs-dev": {
"locked": { "locked": {
"lastModified": 1761748483, "lastModified": 1761853358,
"narHash": "sha256-v7fttCB5lJ22Ok7+N7ZbLhDeM89QIz9YWtQP4XN7xgA=", "narHash": "sha256-1tBdsBzYJOzVzNOmCFzFMWHw7UUbhkhiYCFGr+OjPTs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "061c55856b29b8b9360e14231a0986c7f85f1130", "rev": "262333bca9b49964f8e3cad3af655466597c01d4",
"type": "github" "type": "github"
}, },
"original": { "original": {