Files
.github
.vscode
docs
hydra
keys
lib
modules
autopull.nix
base.nix
boot.nix
docker.nix
endlessh.nix
fail2ban.nix
kub_net.nix
libs.nix
locale.nix
nix.nix
openssh.nix
pam-fingerprint-swap.nix
programs.nix
update.nix
systems
users
.envrc
.gitconfig
.gitignore
.sops.yaml
checks.nix
flake.lock
flake.nix
shell.nix
sops-mergetool.sh
statix.toml
treefmt.toml
nix-dotfiles/modules/kub_net.nix
2024-05-27 17:00:29 +00:00

36 lines
831 B
Nix

{ lib, ... }:
{
system.activationScripts.setZerotierName = lib.stringAfter [ "var" ] ''
echo "ebe7fbd44565ba9d=ztkubnet" > /var/lib/zerotier-one/devicemap
'';
services.zerotierone = {
enable = true;
joinNetworks = [ "ebe7fbd44565ba9d" ];
};
systemd.network = {
enable = true;
wait-online.anyInterface = true;
netdevs = {
"20-brkubnet" = {
netdevConfig = {
Kind = "bridge";
Name = "brkubnet";
};
};
};
networks = {
"30-ztkubnet" = {
matchConfig.Name = "ztkubnet";
networkConfig.Bridge = "brkubnet";
linkConfig.RequiredForOnline = "enslaved";
};
"40-brkubnet" = {
matchConfig.Name = "brkubnet";
bridgeConfig = { };
linkConfig.RequiredForOnline = "no";
};
};
};
}