add wireguard and adguard

This commit is contained in:
Kopatz
2024-05-04 21:06:24 +02:00
parent 349a6d61aa
commit 311c73c9d8
4 changed files with 29 additions and 12 deletions

View File

@@ -1,24 +1,20 @@
{ config, pkgs, inputs, vars, ... }:
{ config, pkgs, inputs, lib , ... }:
with lib;
let
cfg = config.custom.services.acme;
cfg = config.custom.services.adguard;
in
{
options.custom.services.acme = {
enable = mkEnableOption "Enables acme";
options.custom.services.adguard = {
enable = mkEnableOption "Enables adguard";
ip = lib.mkOption {
type = types.str;
default = config.custom.static-ip.ip;
description = "this servers ipv4 address";
};
wireguardIp = lib.mkOption {
type = types.str;
description = "wireguard ipv4 address";
};
};
config = let
ip = cfg.ip;
wireguardIp = cfg.wireguardIp;
wireguardIp = config.custom.services.wireguard.ip;
in lib.mkIf cfg.enable {
networking.firewall.allowedTCPPorts = [ 53 ];
networking.firewall.allowedUDPPorts = [ 53 ];