mirror of
https://github.com/ivabus/nixos
synced 2024-11-24 09:25:06 +03:00
21 lines
636 B
Nix
21 lines
636 B
Nix
{ config, lib, secrets, ... }:
|
|
|
|
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}"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|