2023-12-17 10:57:18 +03:00
|
|
|
{ config, lib, secrets, ... }:
|
2023-07-28 15:39:50 +03:00
|
|
|
|
2023-09-06 16:10:11 +03:00
|
|
|
let cfg = config.my.roles.yggdrasil-client;
|
2023-08-22 19:39:11 +03:00
|
|
|
in {
|
2023-09-06 16:10:11 +03:00
|
|
|
options.my.roles.yggdrasil-client.enable =
|
|
|
|
lib.mkEnableOption "Enable yggdrasil";
|
2023-08-22 19:39:11 +03:00
|
|
|
config = lib.mkIf (cfg.enable) {
|
2023-12-17 10:57:18 +03:00
|
|
|
my.features.secrets = lib.mkForce true;
|
2023-08-22 19:39:11 +03:00
|
|
|
services.yggdrasil = {
|
|
|
|
enable = true;
|
|
|
|
persistentKeys = true;
|
2023-12-17 18:00:15 +03:00
|
|
|
settings = {
|
2023-12-17 10:57:18 +03:00
|
|
|
# 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-08-22 19:39:11 +03:00
|
|
|
];
|
|
|
|
};
|
2023-07-28 15:39:50 +03:00
|
|
|
};
|
|
|
|
};
|
2023-09-06 16:10:11 +03:00
|
|
|
}
|