Setup heimdall

This commit is contained in:
Nathan McCarty 2023-04-10 17:10:25 -04:00
parent a7fa8ac061
commit e147149d83
No known key found for this signature in database
1 changed files with 41 additions and 15 deletions

View File

@ -71,22 +71,37 @@
# Setup home manager # Setup home manager
home-manager.users.nathan = import ./home.nix; home-manager.users.nathan = import ./home.nix;
# Setup pi hole # Containerized applications
virtualisation.oci-containers.containers."pihole" = { virtualisation.oci-containers.containers = {
image = "pihole/pihole:latest"; # Setup pi hole
ports = [ "pihole" = {
"10.0.0.10:53:53/tcp" image = "pihole/pihole:latest";
"10.0.0.10:53:53/udp" ports = [
"100.75.37.98:53:53/tcp" "10.0.0.10:53:53/tcp"
"100.75.37.98:53:53/udp" "10.0.0.10:53:53/udp"
"3080:80" "100.75.37.98:53:53/tcp"
"30443:443" "100.75.37.98:53:53/udp"
]; "3080:80"
volumes = "30443:443"
[ "/var/lib/pihole/:/etc/pihole/" "/var/lib/dnsmasq.d:/etc/dnsmasq.d/" ]; ];
extraOptions = [ "--cap-add=NET_ADMIN" "--dns=1.1.1.1" ]; volumes = [
"/var/lib/pihole/:/etc/pihole/"
"/var/lib/dnsmasq.d:/etc/dnsmasq.d/"
];
extraOptions = [ "--cap-add=NET_ADMIN" "--dns=1.1.1.1" ];
};
# Setup heimdall
"hub" = {
image = "lscr.io/linuxserver/heimdall:latest";
environment = {
"PUID" = "1001";
"PGID" = "1001";
"TZ" = "America/New_York";
};
ports = [ "4080:80" "4433:433" ];
volumes = [ "/var/lib/heimdall:/config" ];
};
}; };
# Nginx virtual hosts # Nginx virtual hosts
services.nginx = { services.nginx = {
enable = true; enable = true;
@ -107,6 +122,17 @@
''; '';
}; };
}; };
"hub.mccarty.io" = {
forceSSL = true;
useACMEHost = "mccarty.io";
locations."/" = {
proxyPass = "http://localhost:4080";
extraConfig = ''
allow 100.64.0.0/10;
deny all;
'';
};
};
"sonarr.mccarty.io" = { "sonarr.mccarty.io" = {
forceSSL = true; forceSSL = true;
useACMEHost = "mccarty.io"; useACMEHost = "mccarty.io";