System Gen172 @ 2025-04-24-01:41:46
This commit is contained in:
parent
a54fb3cea4
commit
9cda35a91a
@ -8,11 +8,6 @@
|
||||
in {
|
||||
options.networking.wg.client = {
|
||||
enable = lib.mkEnableOption "Enable WireGuard client";
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 51820;
|
||||
description = "Port for WireGuard client";
|
||||
};
|
||||
autoConnect = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
@ -25,11 +20,9 @@ in {
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
networking.firewall.allowedUDPPorts = [cfg.port];
|
||||
networking.wg-quick.interfaces.wg0 = {
|
||||
inherit (peers.jonas) address;
|
||||
inherit (cfg) privateKeyFile;
|
||||
listenPort = cfg.port;
|
||||
autostart = cfg.autoConnect;
|
||||
peers = [
|
||||
peers.harbor
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user