clanServices/mycelium: add networking export
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
{ ... }:
|
||||
{
|
||||
lib,
|
||||
clanLib,
|
||||
directory,
|
||||
...
|
||||
}:
|
||||
{
|
||||
_class = "clan.service";
|
||||
manifest.name = "clan-core/mycelium";
|
||||
@@ -30,8 +35,24 @@
|
||||
};
|
||||
|
||||
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 =
|
||||
{
|
||||
config,
|
||||
|
||||
Reference in New Issue
Block a user