nixos/roles/yggdrasil-client.nix

22 lines
636 B
Nix
Raw Permalink Normal View History

{ config, lib, secrets, ... }:
2023-07-28 15:39:50 +03:00
let cfg = config.my.roles.yggdrasil-client;
in {
options.my.roles.yggdrasil-client.enable =
lib.mkEnableOption "Enable yggdrasil";
config = lib.mkIf (cfg.enable) {
my.features.secrets = lib.mkForce true;
services.yggdrasil = {
enable = true;
persistentKeys = true;
settings = {
# Not connecting to global ygg network
Peers = lib.mkDefault [
"quic://${secrets.yggdrasil-peer}:60003?password=${secrets.yggdrasil-password}"
"tls://${secrets.yggdrasil-peer}:60002?password=${secrets.yggdrasil-password}"
];
};
2023-07-28 15:39:50 +03:00
};
};
}