This commit is contained in:
2025-08-03 16:04:58 -05:00
parent c6284b7ed7
commit 538a5fbced

View File

@@ -18,72 +18,76 @@
};
*/
containers = {
pihole = {
autoStart = true;
privateNetwork = true;
hostAddress = "192.168.100.10";
localAddress = "192.168.100.28";
config = let
pkgs-us = import inputs.nixpkgs-us { system = "x86_64-linux"; };
in {
imports = [
(import "${inputs.nixpkgs-us}/nixos/modules/services/networking/pihole-ftl.nix" { config = config.containers.pihole.config; inherit lib; pkgs = pkgs-us;})
(import "${inputs.nixpkgs-us}/nixos/modules/services/web-apps/pihole-web.nix" { config = config.containers.pihole.config; inherit lib; pkgs = pkgs-us;})
];
services = {
pihole-web = {
enable = true;
package = pkgs-us.pihole-web;
#hostName = "192.168.100.28";
ports = [ 80 ];
};
pihole-ftl = {
enable = true;
package = pkgs-us.pihole-ftl;
openFirewallDNS = true;
openFirewallWebserver = true;
lists = [
{
url = "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts";
}
];
settings = {
dns.upstreams = [ "127.0.0.1#5335" ];
};
};
unbound = {
enable = true;
settings = {
server = {
interface = [ "127.0.0.1" ];
port = 5335;
};
};
};
};
system.stateVersion = "24.05";
};
systemd.services."container@pihole.service" = {
serviceConfig = {
TimeoutStartSec = 120;
};
};
containers.pihole = {
autoStart = true;
privateNetwork = true;
hostAddress = "192.168.100.10";
localAddress = "192.168.100.28";
config = let
pkgs-us = import inputs.nixpkgs-us { system = "x86_64-linux"; };
in {
imports = [
(import "${inputs.nixpkgs-us}/nixos/modules/services/networking/pihole-ftl.nix" { config = config.containers.pihole.config; inherit lib; pkgs = pkgs-us;})
(import "${inputs.nixpkgs-us}/nixos/modules/services/web-apps/pihole-web.nix" { config = config.containers.pihole.config; inherit lib; pkgs = pkgs-us;})
];
services = {
pihole-web = {
enable = true;
package = pkgs-us.pihole-web;
#hostName = "192.168.100.28";
ports = [ 80 ];
};
pihole-ftl = {
enable = true;
package = pkgs-us.pihole-ftl;
openFirewallDNS = true;
openFirewallWebserver = true;
lists = [
{
url = "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts";
}
];
settings = {
dns.upstreams = [ "127.0.0.1#5335" ];
};
};
unbound = {
enable = true;
settings = {
server = {
interface = [ "127.0.0.1" ];
port = 5335;
};
};
};
};
system.stateVersion = "24.05";
};
};
};
}