move clanCore into nixosModules, add secrets generate command

This commit is contained in:
lassulus
2023-08-28 11:09:05 +02:00
parent 5e2e95e9c7
commit 9fca1e7f43
10 changed files with 320 additions and 76 deletions

View File

@@ -1,29 +0,0 @@
{ config, lib, ... }:
{
options.clan.networking.zerotier = {
networkId = lib.mkOption {
type = lib.types.str;
description = ''
zerotier networking id
'';
};
};
config = {
systemd.network.networks.zerotier = {
matchConfig.Name = "zt*";
networkConfig = {
LLMNR = true;
LLDP = true;
MulticastDNS = true;
KeepConfiguration = "static";
};
};
networking.firewall.allowedUDPPorts = [ 9993 ];
networking.firewall.interfaces."zt+".allowedTCPPorts = [ 5353 ];
networking.firewall.interfaces."zt+".allowedUDPPorts = [ 5353 ];
services.zerotierone = {
enable = true;
joinNetworks = [ config.clan.networking.zerotier.networkId ];
};
};
}