2024-04-06 10:34:54 +02:00
|
|
|
{ lib, config, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
|
|
|
|
options.wireguard = {
|
|
|
|
wg0 = {
|
|
|
|
subnet = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
default = "10.100.0.1/24";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-17 19:50:56 +02:00
|
|
|
# todo: use networking.wireguard instead of networking wg-quick
|
|
|
|
# with dynamicEndpointRefreshSeconds
|
|
|
|
#config = {
|
|
|
|
# systemd.services.wg-quick-wg0.serviceConfig = {
|
|
|
|
# Restart = "always";
|
|
|
|
# RestartSec = 50;
|
|
|
|
# Type = mkForce "simple";
|
|
|
|
# RemainAfterExit = mkForce false;
|
|
|
|
# };
|
|
|
|
#};
|
|
|
|
|
2024-07-20 13:56:03 +02:00
|
|
|
config = {
|
|
|
|
networking.extraHosts = ''
|
|
|
|
10.100.0.1 cache.orbi.wg0
|
2024-10-09 14:27:12 +02:00
|
|
|
10.100.0.1 orbi.wg0
|
|
|
|
10.100.0.2 chungus.wg0
|
2024-07-20 13:56:03 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-04-06 10:34:54 +02:00
|
|
|
}
|