import
This commit is contained in:
@@ -133,7 +133,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" "unstable=${inputs.nixpkgs-us}" ];
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
{ config, lib, ... }: {
|
{ config, lib, inputs, ... }: {
|
||||||
|
|
||||||
options.sysconfig.opts.virtualization.pihole.enable = lib.options.mkOption {
|
options.sysconfig.opts.virtualization.pihole.enable = lib.options.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
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 {
|
config = lib.mkIf config.sysconfig.opts.virtualization.pihole.enable {
|
||||||
sops.secrets."pihole/pass" = {};
|
/* sops.secrets."pihole/pass" = {};
|
||||||
|
|
||||||
sops.templates."pihole.env" = {
|
sops.templates."pihole.env" = {
|
||||||
content = ''
|
content = ''
|
||||||
@@ -16,7 +21,7 @@
|
|||||||
|
|
||||||
path = "/ssd1/Pihole/.env";
|
path = "/ssd1/Pihole/.env";
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
containers.pihole = {
|
containers.pihole = {
|
||||||
|
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
@@ -25,18 +30,23 @@
|
|||||||
localAddress = "192.168.100.28";
|
localAddress = "192.168.100.28";
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
|
||||||
|
|
||||||
services = {
|
services = let
|
||||||
|
pkgs-us = import inputs.nixpkgs-us { system = "x86_64-linux"; };
|
||||||
|
in {
|
||||||
pihole-web = {
|
pihole-web = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
package = pkgs-us.pihole-web;
|
||||||
|
|
||||||
ports = [ "80r" ];
|
ports = [ "80r" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
pihole-ftl = {
|
pihole-ftl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
package = pkgs-us.pihole-ftl;
|
||||||
|
|
||||||
openFirewallDNS = true;
|
openFirewallDNS = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -44,6 +54,8 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user