add experimental yggdrasil module (TODO: enable)

This commit is contained in:
Colin 2023-03-20 08:12:53 +00:00
parent 8e7586b902
commit 2c6f667a7e
2 changed files with 31 additions and 0 deletions

View File

@ -11,5 +11,6 @@
./roles
./services
./wg-home.nix
./yggdrasil.nix
];
}

View File

@ -0,0 +1,30 @@
# docs: <nixpkgs:nixos/modules/services/networking/yggdrasil.md>
# - or message CW/0x00
{ config, lib, ... }:
let
inherit (lib) mkIf mkOption types;
cfg = config.sane.yggdrasil;
in
{
options.sane.yggdrasil = {
enable = mkOption {
type = types.bool;
default = false;
};
};
config = mkIf cfg.enable {
services.yggdrasil = {
enable = true;
persistentKeys = true;
config = {
IFName = "ygg0";
Peers = [
"tls://longseason.1200bps.xyz:13122"
];
};
};
};
}