Add yggdrasil container

This commit is contained in:
Emery Hemingway 2022-01-13 19:49:33 +01:00
parent 382d5fd7d9
commit 29c74782c7
3 changed files with 39 additions and 3 deletions

View File

@ -40,9 +40,7 @@
# Configuration for nixosConfigurations
# (see nix/nixos-module/default.nix)
nixosModule = { ... }: {
imports = [ ./nix/nixos-module ];
};
nixosModule = import ./nix/nixos-module;
# NixOS host systems (servers, and containers)
nixosConfigurations =

View File

@ -0,0 +1,37 @@
{ pkgs, lib, config, hostRegistry, zentralwerk, ... }:
let
host = hostRegistry.hosts.yggdrasil;
yggAddress = host.ygg;
yggPrefix = "301:4561:bb58:4dac"; # 301:4561:bb58:4dac::/64
# taken from the output of "yggdrasilctl getself".
port = 46823;
in {
networking.firewall.enable = false;
services.yggdrasil = {
enable = true;
persistentKeys = true;
config = {
IfName = "ygg";
Peers = # https://publicpeers.neilalexander.dev/
[
# deutschland
"tcp://ygg.mkg20001.io:80"
# czechia
"tcp://[2a03:3b40:fe:ab::1]:46370" # emery vpsfree.cz
# nederlands
"tls://77.249.167.165:8084" # emery nijmegen
];
NodeInfo = {
# This information is visible to the network.
name = "y.c3d2.de";
location = "Dresden";
email = "ehmry@c3d2.de";
};
};
};
}

View File

@ -25,6 +25,7 @@ in {
./container/wireguard.nix
./container/dns.nix
./container/dnscache.nix
./container/yggdrasil.nix
] ++
optionals lib.config.site.hosts.${hostName}.isRouter [
./container/bird.nix