Add home-assistant and fail2ban

This commit is contained in:
Jacob Hinkle 2022-10-13 09:07:15 -04:00
parent 8e589775a2
commit 75e642c6cf
2 changed files with 28 additions and 0 deletions

View File

@ -116,6 +116,7 @@
virtualisation.oci-containers.containers = let virtualisation.oci-containers.containers = let
serverIP = "192.168.88.21"; serverIP = "192.168.88.21";
in { in {
home-assistant = import ./home-assistant.nix serverIP;
pihole = import ./pihole.nix serverIP; pihole = import ./pihole.nix serverIP;
}; };
@ -123,6 +124,16 @@
services = { services = {
chrony.enable = true; chrony.enable = true;
fail2ban = {
enable = true;
maxretry = 5;
ignoreIP = [
"127.0.0.0/8" # localhost
"192.168.0.0/16" # LAN
"160.91.241.229" # lucky
];
};
gitea = import ./gitea.nix; gitea = import ./gitea.nix;
nginx = import ./nginx.nix; nginx = import ./nginx.nix;

View File

@ -0,0 +1,17 @@
serverIP :
{
image = "ghcr.io/home-assistant/home-assistant:2022.8.5";
#ports = [
#"8123:8123"
#];
volumes = [
"/etc/localtime:/etc/localtime:ro"
"/serverdata/home-assistant:/config"
];
extraOptions = [
"--privileged"
"--network=host"
#"--device /dev/ttyUSB0"
#"--device /dev/ttyUSB1"
];
}