❄️ Nix configurations
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add uptime and blocky

A. Ottr 530a6bc3 2fed7e25

+71
+2
hosts/polecat/configuration.nix
··· 13 13 ../../modules/nixos/server/home-assistant.nix 14 14 ../../modules/nixos/server/media.nix 15 15 ../../modules/nixos/server/plex.nix 16 + ../../modules/nixos/server/blocky.nix 17 + ../../modules/nixos/server/uptime.nix 16 18 ]; 17 19 18 20 age.secrets."passwd".file = ../../secrets/common/passwd.age;
+41
modules/nixos/server/blocky.nix
··· 1 + { pkgs, config, ... }: 2 + 3 + { 4 + services.blocky = { 5 + enable = true; 6 + settings = { 7 + ports.dns = 53; 8 + connectIPVersion = "v4"; 9 + 10 + upstreams.groups.default = [ 11 + "https://one.one.one.one/dns-query" 12 + ]; 13 + 14 + bootstrapDns = { 15 + upstream = "https://one.one.one.one/dns-query"; 16 + ips = [ "1.1.1.1" "1.0.0.1" ]; 17 + }; 18 + 19 + blocking = { 20 + denylists = { 21 + #Adblocking 22 + ads = ["https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"]; 23 + }; 24 + 25 + clientGroupsBlock = { 26 + default = [ "ads" ]; 27 + }; 28 + }; 29 + 30 + caching = { 31 + minTime = "5m"; 32 + maxTime = "2h"; 33 + prefetching = true; 34 + }; 35 + }; 36 + }; 37 + 38 + services.resolved.enable = false; 39 + networking.firewall.allowedUDPPorts = [ 53 ]; 40 + networking.firewall.allowedTCPPorts = [ 53 ]; 41 + }
+28
modules/nixos/server/uptime.nix
··· 1 + { pkgs, config, lib, ... }: 2 + 3 + { 4 + services.uptime-kuma = { 5 + enable = true; 6 + settings = { 7 + PORT = "48080"; 8 + UPTIME_KUMA_DB_TYPE = "sqlite"; 9 + }; 10 + }; 11 + 12 + services.traefik.dynamicConfigOptions = lib.mkIf config.services.traefik.enable { 13 + http = { 14 + routers.uptime-kuma = { 15 + rule = "Host(`uptime.otter.place`)"; 16 + service = "uptime-kuma"; 17 + tls.certResolver = "letsencrypt"; 18 + }; 19 + services.uptime-kuma = { 20 + loadBalancer.servers = [{ 21 + url = "http://localhost:48080"; 22 + }]; 23 + }; 24 + }; 25 + }; 26 + 27 + networking.firewall.allowedTCPPorts = lib.mkIf (!config.services.traefik.enable) [ 48080 ]; 28 + }