Compare commits
14 Commits
master
...
e68dacc78c
Author | SHA1 | Date | |
---|---|---|---|
e68dacc78c
|
|||
66cf91aa78
|
|||
d056cb0cb1
|
|||
c38d93f36f
|
|||
963e99ec8a
|
|||
2ef90f25c5
|
|||
6c7edf43d1
|
|||
fe9fe3ec51
|
|||
99dd5ec1fe
|
|||
378f2d9882
|
|||
f8405bf012
|
|||
922e86a408
|
|||
84cd90325d
|
|||
23c24dc6ad
|
@ -7,7 +7,12 @@
|
||||
../server.nix
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = "aarch64-linux";
|
||||
nixpkgs = {
|
||||
hostPlatform = "aarch64-linux";
|
||||
overlays = [
|
||||
(import ./../../overlays/ha-floorplan.nix)
|
||||
];
|
||||
};
|
||||
|
||||
hardware = {
|
||||
raspberry-pi."4" = {
|
||||
@ -117,31 +122,18 @@
|
||||
|
||||
services.home-assistant = {
|
||||
enable = true;
|
||||
extraComponents = [
|
||||
"api"
|
||||
"alert"
|
||||
"auth"
|
||||
"backup"
|
||||
"command_line"
|
||||
"default_config"
|
||||
"homekit_controller"
|
||||
"homekit"
|
||||
"http"
|
||||
"icloud"
|
||||
"jellyfin"
|
||||
"metoffice"
|
||||
"mqtt"
|
||||
"onkyo"
|
||||
"ping"
|
||||
"proximity"
|
||||
"radio_browser"
|
||||
"scrape"
|
||||
"sensor"
|
||||
"system_health"
|
||||
];
|
||||
|
||||
config = {
|
||||
default_config = {};
|
||||
backup = {};
|
||||
automation = "!include automations.yaml";
|
||||
backup = { };
|
||||
binary_sensor = [ ];
|
||||
default_config = { };
|
||||
http = {
|
||||
server_host = "::1";
|
||||
trusted_proxies = [ "::1" ];
|
||||
use_x_forwarded_for = true;
|
||||
};
|
||||
ffmpeg = { };
|
||||
homeassistant = {
|
||||
name = "Home";
|
||||
latitude = "!secret latitude";
|
||||
@ -150,14 +142,262 @@
|
||||
temperature_unit = "C";
|
||||
time_zone = config.time.timeZone;
|
||||
unit_system = "metric";
|
||||
auth_providers = [
|
||||
{
|
||||
type = "trusted_networks";
|
||||
trusted_networks = [
|
||||
"100.64.0.0/10"
|
||||
"127.0.0.1"
|
||||
];
|
||||
allow_bypass_login = true;
|
||||
}
|
||||
{
|
||||
type = "homeassistant";
|
||||
}
|
||||
];
|
||||
};
|
||||
logger = {
|
||||
default = "info";
|
||||
logs = { };
|
||||
};
|
||||
lovelace = {
|
||||
resources = [
|
||||
{
|
||||
url = "/local/nixos-lovelace-modules/floorplan.js";
|
||||
type = "module";
|
||||
}
|
||||
{
|
||||
url = "/local/nixos-lovelace-modulels/mushroom.js";
|
||||
type = "module";
|
||||
}
|
||||
];
|
||||
};
|
||||
media_player = [ ];
|
||||
mobile_app = { };
|
||||
mqtt = { };
|
||||
scene = "!include scenes.yaml";
|
||||
automation = "!include automations.yaml";
|
||||
system_health = { };
|
||||
onkyo = { };
|
||||
open_meteo = { };
|
||||
recorder = {
|
||||
purge_keep_days = 365;
|
||||
};
|
||||
scene = "!include scenes.yaml";
|
||||
sensor = [ ];
|
||||
system_health = { };
|
||||
zeroconf = { };
|
||||
};
|
||||
|
||||
extraComponents = [
|
||||
"air_quality"
|
||||
"airly"
|
||||
"alert"
|
||||
"api"
|
||||
"application_credentials"
|
||||
"asuswrt"
|
||||
"auth"
|
||||
"automation"
|
||||
"bayesian"
|
||||
"binary_sensor"
|
||||
# "blackbird"
|
||||
"blueprint"
|
||||
"bluetooth_adapters"
|
||||
"bluetooth_le_tracker"
|
||||
"button"
|
||||
"calendar"
|
||||
"camera"
|
||||
"cast"
|
||||
"cert_expiry"
|
||||
"climate"
|
||||
"co2signal"
|
||||
"color_extractor"
|
||||
"command_line"
|
||||
"compensation"
|
||||
"configurator"
|
||||
"counter"
|
||||
"cover"
|
||||
"cpuspeed"
|
||||
"default_config"
|
||||
"demo"
|
||||
"derivative"
|
||||
"device_automation"
|
||||
"device_sun_light_trigger"
|
||||
"device_tracker"
|
||||
"dlna_dmr"
|
||||
"dlna_dms"
|
||||
"dnsip"
|
||||
"esphome"
|
||||
"fail2ban"
|
||||
"fan"
|
||||
"feedreader"
|
||||
"ffmpeg"
|
||||
"file"
|
||||
"file_upload"
|
||||
"filesize"
|
||||
"folder"
|
||||
"folder_watcher"
|
||||
"forecast_solar"
|
||||
"frontend"
|
||||
"gdacs"
|
||||
"generic"
|
||||
"generic_hygrostat"
|
||||
"generic_thermostat"
|
||||
"geo_json_events"
|
||||
"geo_location"
|
||||
"geo_rss_events"
|
||||
"github"
|
||||
"group"
|
||||
"hardware"
|
||||
"hdmi_cec"
|
||||
"history_stats"
|
||||
"homeassistant"
|
||||
"homekit"
|
||||
"homekit_controller"
|
||||
"html5"
|
||||
"http"
|
||||
"humidifier"
|
||||
"icloud"
|
||||
"image_processing"
|
||||
"input_boolean"
|
||||
"input_button"
|
||||
"input_datetime"
|
||||
"input_number"
|
||||
"input_select"
|
||||
"input_text"
|
||||
"integration"
|
||||
"ios"
|
||||
"jellyfin"
|
||||
"light"
|
||||
"local_calendar"
|
||||
"local_file"
|
||||
"local_ip"
|
||||
"local_todo"
|
||||
"lock"
|
||||
"logentries"
|
||||
"logger"
|
||||
"lovelace"
|
||||
"manual"
|
||||
"manual_mqtt"
|
||||
"matter"
|
||||
"media_player"
|
||||
"min_max"
|
||||
"mjpeg"
|
||||
"modern_forms"
|
||||
"mold_indicator"
|
||||
"moon"
|
||||
"mqtt"
|
||||
"mqtt_eventstream"
|
||||
"mqtt_json"
|
||||
"mqtt_room"
|
||||
"mqtt_statestream"
|
||||
"mysensors"
|
||||
"network"
|
||||
"nmap_tracker"
|
||||
"notify"
|
||||
"number"
|
||||
"onboarding"
|
||||
"onkyo"
|
||||
"panel_custom"
|
||||
"persistent_notification"
|
||||
"person"
|
||||
"ping"
|
||||
"plant"
|
||||
"prometheus"
|
||||
"proximity"
|
||||
"push"
|
||||
"proximity"
|
||||
"python_script"
|
||||
"radio_browser"
|
||||
"random"
|
||||
"recorder"
|
||||
"remote"
|
||||
"repairs"
|
||||
"rest"
|
||||
"rest_command"
|
||||
"rss_feed_template"
|
||||
"scene"
|
||||
"schedule"
|
||||
"scrape"
|
||||
"script"
|
||||
"search"
|
||||
"season"
|
||||
"select"
|
||||
"sense"
|
||||
"sensor"
|
||||
"sensorpush"
|
||||
"shell_command"
|
||||
"shopping_list"
|
||||
"siren"
|
||||
"smtp"
|
||||
"snmp"
|
||||
"sql"
|
||||
"statistics"
|
||||
"sun"
|
||||
"switch"
|
||||
"switch_as_x"
|
||||
"system_health"
|
||||
"system_log"
|
||||
"systemmonitor"
|
||||
"tag"
|
||||
"tailscale"
|
||||
"tcp"
|
||||
"template"
|
||||
"text"
|
||||
"thread"
|
||||
"threshold"
|
||||
"time_date"
|
||||
"timer"
|
||||
"tod"
|
||||
"todo"
|
||||
"tomorrowio"
|
||||
"trend"
|
||||
"universal"
|
||||
"upb"
|
||||
"update"
|
||||
"upnp"
|
||||
"uptime"
|
||||
"usb"
|
||||
"utility_meter"
|
||||
"vacuum"
|
||||
"vlc"
|
||||
"vlc_telnet"
|
||||
"wake_on_lan"
|
||||
"water_heater"
|
||||
"weather"
|
||||
"webhook"
|
||||
"websocket_api"
|
||||
"wled"
|
||||
"workday"
|
||||
"worldclock"
|
||||
"zeroconf"
|
||||
"zone"
|
||||
];
|
||||
|
||||
extraPackages = python3Packages: with python3Packages; [
|
||||
onkyo-eiscp
|
||||
zeroconf
|
||||
];
|
||||
|
||||
customLovelaceModules = with pkgs.home-assistant-custom-lovelace-modules; [
|
||||
bubble-card
|
||||
button-card
|
||||
ha-floorplan
|
||||
mushroom
|
||||
sankey-chart
|
||||
universal-remote-card
|
||||
# zigbee2mqtt-networkmap
|
||||
];
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."home.mesh.vimium.net" = {
|
||||
forceSSL = false;
|
||||
extraConfig = ''
|
||||
proxy_buffering off;
|
||||
'';
|
||||
locations."/" = {
|
||||
proxyPass = "http://[::1]:8123";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -36,7 +36,7 @@ with lib;
|
||||
in {
|
||||
inherit name;
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "networkmanager" "wheel" "lxd" ];
|
||||
extraGroups = [ "audio" "networkmanager" "wheel" "lxd" ];
|
||||
description = "Jordan Holt";
|
||||
useDefaultShell = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
|
6
overlays/ha-floorplan.nix
Normal file
6
overlays/ha-floorplan.nix
Normal file
@ -0,0 +1,6 @@
|
||||
final: prev:
|
||||
{
|
||||
home-assistant-custom-lovelace-modules = prev.home-assistant-custom-lovelace-modules // {
|
||||
ha-floorplan = prev.callPackage ../pkgs/ha-floorplan/package.nix { };
|
||||
};
|
||||
}
|
38
pkgs/ha-floorplan/package.nix
Normal file
38
pkgs/ha-floorplan/package.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub
|
||||
}:
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "floorplan";
|
||||
version = "1.0.44";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ExperienceLovelace";
|
||||
repo = "ha-floorplan";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-ajEA47H9nFXVcuvhwkDsxc5YYQWMsUXqHQ3t6tuAaxc=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-/6H3XMraD7/usZBwmQaCDpV2n1Eed+U+G0f2YnjyWgk=";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir $out
|
||||
cp -R dist/* $out/
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Floorplan for Home Assistant";
|
||||
longDescription = ''
|
||||
Bring new life to Home Assistant. By mapping entities to a SVG-object,
|
||||
you're able to control devices, show states, calling services - and much
|
||||
more. Add custom styling on top, to visualize whatever you can think of.
|
||||
Your imagination just became the new limit.
|
||||
'';
|
||||
homepage = "https://github.com/ExperienceLovelace/ha-floorplan";
|
||||
license = lib.licenses.asl20;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user