aboutsummaryrefslogtreecommitdiff
path: root/modules/retired/pihole
diff options
context:
space:
mode:
authortdback <tyler@tdback.net>2025-01-16 19:57:13 -0500
committertdback <tyler@tdback.net>2025-01-16 19:57:13 -0500
commit88017f5a874478dd82f306a5df88c38a8d06fcb6 (patch)
tree8806c58c4f21bb6a56d8530df8a93b256d44b4f3 /modules/retired/pihole
parent01d012473d4311d4f4e5a0831d912bc4b8c61639 (diff)
fix: format flake with `nixfmt-rfc-style`
Diffstat (limited to 'modules/retired/pihole')
-rw-r--r--modules/retired/pihole/default.nix20
1 files changed, 12 insertions, 8 deletions
diff --git a/modules/retired/pihole/default.nix b/modules/retired/pihole/default.nix
index 034c91b..3a95f8a 100644
--- a/modules/retired/pihole/default.nix
+++ b/modules/retired/pihole/default.nix
@@ -1,15 +1,15 @@
-{ inputs, config, lib, ... }:
+{
+ inputs,
+ config,
+ ...
+}:
let
- # TODO: Think about changing this to config.networking.interface...
- # Will have to pull the first value in the list, which might be messy but it
- # will definitely make it more producible across machines.
ip = "10.0.0.203";
interface = "eno1";
directory = "/opt/pihole";
in
{
- systemd.tmpfiles.rules =
- map (x: "d ${x} 0755 share share - -") (lib.lists.singleton directory);
+ systemd.tmpfiles.rules = builtins.map (x: "d ${x} 0755 share share - -") [ directory ];
virtualisation.oci-containers.containers.pihole = {
image = "pihole/pihole:latest";
@@ -41,12 +41,16 @@ in
systemd.services.podman-pihole.postStart =
let
password = config.age.secrets.piholeAdminPass.path;
- in ''
+ in
+ ''
podman exec -it pihole pihole -a -p "$(tr -d '\n' < ${password})"
'';
networking.firewall = {
- allowedTCPPorts = [ 53 80 ];
+ allowedTCPPorts = [
+ 53
+ 80
+ ];
allowedUDPPorts = [ 53 ];
};
}