Loading nixos/modules/services/networking/pihole-ftl-setup-script.nix +4 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ let comment = list.description; }; payloads = map makePayload cfg.lists; macvendorURL = lib.strings.escapeShellArg cfg.macvendorURL; in '' # Can't use -u (unset) because api.sh uses API_URL before it is set Loading @@ -22,8 +23,10 @@ in pihole="${lib.getExe pihole}" jq="${lib.getExe pkgs.jq}" ${lib.getExe pkgs.curl} --retry 3 --retry-delay 5 "${macvendorURL}" -o "${cfg.settings.files.macvendor}" || echo "Failed to download MAC database from ${macvendorURL}" # If the database doesn't exist, it needs to be created with gravity.sh if [ ! -f '${cfg.stateDirectory}'/gravity.db ]; then if [ ! -f '${cfg.settings.files.gravity}' ]; then $pihole -g # Send SIGRTMIN to FTL, which makes it reload the database, opening the newly created one ${lib.getExe' pkgs.procps "kill"} -s SIGRTMIN $(systemctl show --property MainPID --value ${config.systemd.services.pihole-ftl.name}) Loading nixos/modules/services/networking/pihole-ftl.nix +9 −1 Original line number Diff line number Diff line Loading @@ -118,6 +118,14 @@ in ''; }; macvendorURL = mkOption { type = types.str; default = "https://ftl.pi-hole.net/macvendor.db"; description = '' URL from which to download the macvendor.db file. ''; }; pihole = mkOption { type = types.package; default = piholeScript; Loading Loading @@ -260,7 +268,7 @@ in files = { database = "${cfg.stateDirectory}/pihole-FTL.db"; gravity = "${cfg.stateDirectory}/gravity.db"; macvendor = "${cfg.stateDirectory}/gravity.db"; macvendor = "${cfg.stateDirectory}/macvendor.db"; log.ftl = "${cfg.logDirectory}/FTL.log"; log.dnsmasq = "${cfg.logDirectory}/pihole.log"; log.webserver = "${cfg.logDirectory}/webserver.log"; Loading pkgs/by-name/pi/pihole-ftl/package.nix +2 −1 Original line number Diff line number Diff line { lib, stdenv, nixosTests, fetchFromGitHub, cmake, gmp, Loading @@ -12,7 +13,6 @@ readline, xxd, iproute2, ... }: stdenv.mkDerivation (finalAttrs: { Loading Loading @@ -78,6 +78,7 @@ stdenv.mkDerivation (finalAttrs: { ''; passthru.settingsTemplate = ./pihole.toml; passthru.tests = nixosTests.pihole-ftl; meta = { description = "Pi-hole FTL engine"; Loading pkgs/by-name/pi/pihole-web/package.nix +3 −0 Original line number Diff line number Diff line { stdenv, lib, nixosTests, fetchFromGitHub, pihole, pihole-ftl, Loading Loading @@ -36,6 +37,8 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; passthru.tests = nixosTests.pihole-ftl; meta = { description = "Pi-hole web dashboard displaying stats and more"; homepage = "https://github.com/pi-hole/web"; Loading pkgs/by-name/pi/pihole/package.nix +3 −0 Original line number Diff line number Diff line { lib, nixosTests, fetchFromGitHub, makeBinaryWrapper, installShellFiles, Loading Loading @@ -238,6 +239,8 @@ mainProgram = "pihole"; }; passthru.tests = nixosTests.pihole-ftl; passthru = { inherit stateDir; }; Loading Loading
nixos/modules/services/networking/pihole-ftl-setup-script.nix +4 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ let comment = list.description; }; payloads = map makePayload cfg.lists; macvendorURL = lib.strings.escapeShellArg cfg.macvendorURL; in '' # Can't use -u (unset) because api.sh uses API_URL before it is set Loading @@ -22,8 +23,10 @@ in pihole="${lib.getExe pihole}" jq="${lib.getExe pkgs.jq}" ${lib.getExe pkgs.curl} --retry 3 --retry-delay 5 "${macvendorURL}" -o "${cfg.settings.files.macvendor}" || echo "Failed to download MAC database from ${macvendorURL}" # If the database doesn't exist, it needs to be created with gravity.sh if [ ! -f '${cfg.stateDirectory}'/gravity.db ]; then if [ ! -f '${cfg.settings.files.gravity}' ]; then $pihole -g # Send SIGRTMIN to FTL, which makes it reload the database, opening the newly created one ${lib.getExe' pkgs.procps "kill"} -s SIGRTMIN $(systemctl show --property MainPID --value ${config.systemd.services.pihole-ftl.name}) Loading
nixos/modules/services/networking/pihole-ftl.nix +9 −1 Original line number Diff line number Diff line Loading @@ -118,6 +118,14 @@ in ''; }; macvendorURL = mkOption { type = types.str; default = "https://ftl.pi-hole.net/macvendor.db"; description = '' URL from which to download the macvendor.db file. ''; }; pihole = mkOption { type = types.package; default = piholeScript; Loading Loading @@ -260,7 +268,7 @@ in files = { database = "${cfg.stateDirectory}/pihole-FTL.db"; gravity = "${cfg.stateDirectory}/gravity.db"; macvendor = "${cfg.stateDirectory}/gravity.db"; macvendor = "${cfg.stateDirectory}/macvendor.db"; log.ftl = "${cfg.logDirectory}/FTL.log"; log.dnsmasq = "${cfg.logDirectory}/pihole.log"; log.webserver = "${cfg.logDirectory}/webserver.log"; Loading
pkgs/by-name/pi/pihole-ftl/package.nix +2 −1 Original line number Diff line number Diff line { lib, stdenv, nixosTests, fetchFromGitHub, cmake, gmp, Loading @@ -12,7 +13,6 @@ readline, xxd, iproute2, ... }: stdenv.mkDerivation (finalAttrs: { Loading Loading @@ -78,6 +78,7 @@ stdenv.mkDerivation (finalAttrs: { ''; passthru.settingsTemplate = ./pihole.toml; passthru.tests = nixosTests.pihole-ftl; meta = { description = "Pi-hole FTL engine"; Loading
pkgs/by-name/pi/pihole-web/package.nix +3 −0 Original line number Diff line number Diff line { stdenv, lib, nixosTests, fetchFromGitHub, pihole, pihole-ftl, Loading Loading @@ -36,6 +37,8 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; passthru.tests = nixosTests.pihole-ftl; meta = { description = "Pi-hole web dashboard displaying stats and more"; homepage = "https://github.com/pi-hole/web"; Loading
pkgs/by-name/pi/pihole/package.nix +3 −0 Original line number Diff line number Diff line { lib, nixosTests, fetchFromGitHub, makeBinaryWrapper, installShellFiles, Loading Loading @@ -238,6 +239,8 @@ mainProgram = "pihole"; }; passthru.tests = nixosTests.pihole-ftl; passthru = { inherit stateDir; }; Loading