feat(rpi4): add home-assistant
This commit is contained in:
parent
358aa776c0
commit
806a3e23cf
21
rpi4.nix
21
rpi4.nix
|
@ -8,6 +8,7 @@
|
||||||
./system/i18n.nix
|
./system/i18n.nix
|
||||||
./services/jellyfin.nix
|
./services/jellyfin.nix
|
||||||
./modules/cfdyndns.nix
|
./modules/cfdyndns.nix
|
||||||
|
./services/home-assistant.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
@ -41,6 +42,26 @@
|
||||||
records = [ "home.felschr.com" ];
|
records = [ "home.felschr.com" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
recommendedTlsSettings = true;
|
||||||
|
recommendedOptimisation = true;
|
||||||
|
recommendedGzipSettings = true;
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
|
||||||
|
virtualHosts = {
|
||||||
|
"home.felschr.com" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://localhost:8123";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
34
services/home-assistant.nix
Normal file
34
services/home-assistant.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
with pkgs;
|
||||||
|
{
|
||||||
|
services.home-assistant = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
config = {
|
||||||
|
homeassistant = {
|
||||||
|
name = "Home";
|
||||||
|
latitude = "!secret latitude";
|
||||||
|
longitude = "!secret longitude";
|
||||||
|
elevation = 0;
|
||||||
|
unit_system = "metric";
|
||||||
|
temperature_unit = "C";
|
||||||
|
external_url = "https://home.felschr.com";
|
||||||
|
internal_url = "http://192.168.86.233:8123";
|
||||||
|
};
|
||||||
|
default_config = {};
|
||||||
|
config = {};
|
||||||
|
frontend = {};
|
||||||
|
mobile_app = {};
|
||||||
|
discovery = {};
|
||||||
|
zeroconf = {};
|
||||||
|
ssdp = {};
|
||||||
|
shopping_list = {};
|
||||||
|
owntracks = {
|
||||||
|
mqtt_topic = "owntracks/#";
|
||||||
|
secret = "!secret owntracks_secret";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# configWritable = true; # doesn't work atm
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue