Pi-Hole back to config dir.

This commit is contained in:
Raphaël Numbus
2026-02-16 14:40:42 +01:00
parent c6ce0be03e
commit bd05897efa
3 changed files with 19 additions and 21 deletions
+16 -16
View File
@@ -64,23 +64,23 @@ PODMAN_NETWORKS
DOMAIN_NAME="$(cat /run/secrets/domain_name)"
#echo "Applying Pi-Hole quirks..."
#if [[ -e /etc/nixos/podman/pi-hole.nix ]]; then
# mkdir -p /mnt/config/pi-hole/
# chown -R numbus-admin:users /mnt/config/pi-hole/
# echo "Waiting for Pi-hole to be ready..."
# until [[ -e /mnt/config/pi-hole/pihole-FTL.db ]]; do
# sleep 15
# done
# sleep 60
# sudo -u numbus-admin podman exec pi-hole pihole -g
# sleep 60
# systemctl restart pi-hole.service
# echo "Pi-Hole quirk applied and service ready !"
#fi
if [[ -e /etc/nixos/podman/pi-hole.nix ]]; then
echo "Applying Pi-Hole quirks..."
mkdir -p /mnt/config/pi-hole/
chown -R numbus-admin:users /mnt/config/pi-hole/
echo "Waiting for Pi-hole to be ready..."
until [[ -e /mnt/config/pi-hole/pihole-FTL.db ]]; do
sleep 15
done
sleep 60
sudo -u numbus-admin podman exec pi-hole pihole -g
sleep 60
systemctl restart pi-hole.service
echo "Pi-Hole quirk applied and service ready !"
fi
echo "Applying Home Assistant quirks..."
if [[ -e /etc/nixos/podman/home-assistant.nix ]]; then
echo "Applying Home Assistant quirks..."
mkdir -p /mnt/config/home-assistant/
chown -R numbus-admin:users /mnt/config/home-assistant/
echo "Waiting for Home Assistant to be ready..."
@@ -101,8 +101,8 @@ EOF
echo "Home Assistant quirk applied and service ready !"
fi
echo "Applying Frigate quirks..."
if [[ -e /etc/nixos/podman/frigate.nix ]]; then
echo "Applying Frigate quirks..."
mkdir -p /mnt/config/frigate/
chown -R numbus-admin:users /mnt/config/frigate/
echo "Waiting for Frigate to be ready..."
+1 -1
View File
@@ -18,7 +18,7 @@
'';
shellAliases = {
nixup = "cd /etc/nixos/ && sudo nix flake update && sudo nixos-rebuild --flake . switch --upgrade && cd -";
nixwitch = "cd /etc/nix && sudo nix flake update && sudo nixos-rebuild --flake . switch && cd -";
nixwitch = "cd /etc/nixos/ && sudo nix flake update && sudo nixos-rebuild --flake . switch && cd -";
systraefik = "sudo systemctl status traefik.service";
syspi-hole = "sudo systemctl status pi-hole.service";
syspassbolt = "sudo systemctl status passbolt.service";
+2 -4
View File
@@ -3,6 +3,7 @@
let
container_name = "pi-hole";
compose_file = "podman/pi-hole/compose.yaml";
config_dir = "/mnt/config/pi-hole";
in
{
@@ -42,7 +43,7 @@ in
FTLCONF_ntp_ipv6_active: "false"
FTLCONF_ntp_sync_active: "false"
volumes:
- pi-hole_data:/etc/pihole
- ${config_dir}:/etc/pihole
cap_add:
- SYS_NICE
labels:
@@ -56,9 +57,6 @@ in
- traefik.http.routers.pihole-https.tls.certresolver=cloudflare
restart: unless-stopped
volumes:
pi-hole_data:
networks:
pi-hole_frontend:
external: true