From e07f19eae0daf61f47ec310c550b480d7e4342a2 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Thu, 23 Feb 2023 22:42:03 +0100 Subject: [PATCH] service/blocky: init dumy service --- modules/services/blocky/default.nix | 32 +++++++++++++++++++++++++++++ modules/services/default.nix | 1 + 2 files changed, 33 insertions(+) create mode 100644 modules/services/blocky/default.nix diff --git a/modules/services/blocky/default.nix b/modules/services/blocky/default.nix new file mode 100644 index 0000000..a1b63cd --- /dev/null +++ b/modules/services/blocky/default.nix @@ -0,0 +1,32 @@ +# Fast and lightweight DNS proxy as ad-blocker for local network +{ config, lib, pkgs, ... }: +let + cfg = config.my.services.blocky; + domain = config.networking.domain; +in +{ + options.my.services.blocky = with lib; { + enable = mkEnableOption "Blocky DNS Server"; + + settings = mkOption { + type = (pkgs.formats.json { }).type; + default = { }; + example = { + "tlsPort" = ":853"; + }; + description = '' + Override settings. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + services.blocky = { + enable = true; + + settings = { + "tlsPort" = ":853"; + } // cfg.settings; + }; + }; +} diff --git a/modules/services/default.nix b/modules/services/default.nix index a2e4e12..24549e3 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -2,6 +2,7 @@ { imports = [ ./backup + #./blocky ./freshrss ./gitea ./hedgedoc