This commit is contained in:
2025-08-01 14:03:40 -05:00
parent 116f935389
commit ce27df5933
2 changed files with 18 additions and 6 deletions

View File

@@ -133,7 +133,7 @@
};
nix = {
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
nixPath = [ "nixpkgs=${inputs.nixpkgs}" "unstable=${inputs.nixpkgs-us}" ];
settings = {
experimental-features = [ "nix-command" "flakes" ];
};

View File

@@ -1,13 +1,18 @@
{ config, lib, ... }: {
{ config, lib, inputs, ... }: {
options.sysconfig.opts.virtualization.pihole.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
imports = [
"${inputs.nixpkgs-us}/nixos/modules/services/networking/pihole-ftl.nix"
"${inputs.nixpkgs-us}/nixos/modules/services/web-apps/pihole-web.nix"
];
config = lib.mkIf config.sysconfig.opts.virtualization.pihole.enable {
sops.secrets."pihole/pass" = {};
/* sops.secrets."pihole/pass" = {};
sops.templates."pihole.env" = {
content = ''
@@ -16,7 +21,7 @@
path = "/ssd1/Pihole/.env";
};
*/
containers.pihole = {
autoStart = true;
@@ -25,18 +30,23 @@
localAddress = "192.168.100.28";
config = {
networking.firewall.allowedTCPPorts = [ 80 ];
services = {
services = let
pkgs-us = import inputs.nixpkgs-us { system = "x86_64-linux"; };
in {
pihole-web = {
enable = true;
package = pkgs-us.pihole-web;
ports = [ "80r" ];
};
pihole-ftl = {
enable = true;
package = pkgs-us.pihole-ftl;
openFirewallDNS = true;
};
@@ -44,6 +54,8 @@
enable = true;
};
};
networking.firewall.allowedTCPPorts = [ 80 ];
system.stateVersion = "24.05";
};