Update home-assistant
This commit is contained in:
parent
8991c71727
commit
0988185397
11
cachix/mweinelt.nix
Normal file
11
cachix/mweinelt.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
nix = {
|
||||||
|
binaryCaches = [
|
||||||
|
"https://mweinelt.cachix.org"
|
||||||
|
];
|
||||||
|
binaryCachePublicKeys = [
|
||||||
|
"mweinelt.cachix.org-1:J9OCu2VAPJ2IHzpOfoJt16Fm5xl9q8VOHqcqCGSNKsM="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -75,6 +75,18 @@
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/1ca6b0a0cc38dbba0441202535c92841dd39d1ae.tar.gz",
|
"url": "https://github.com/NixOS/nixpkgs/archive/1ca6b0a0cc38dbba0441202535c92841dd39d1ae.tar.gz",
|
||||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||||
},
|
},
|
||||||
|
"hexa-nur-packages": {
|
||||||
|
"branch": "master",
|
||||||
|
"description": "My personal NUR repository: [maintainer=@mweinelt] ",
|
||||||
|
"homepage": "",
|
||||||
|
"owner": "mweinelt",
|
||||||
|
"repo": "nur-packages",
|
||||||
|
"rev": "0e816f9438fa9049ffbed03db576948ddf51e419",
|
||||||
|
"sha256": "1zr6dad3d9dc6lq1r1cdrrnpypix3qffjwgvy181ld5f8zg069ir",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/mweinelt/nur-packages/archive/0e816f9438fa9049ffbed03db576948ddf51e419.tar.gz",
|
||||||
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||||
|
},
|
||||||
"obelisk": {
|
"obelisk": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"description": "Obelisk provides an easy way to develop and deploy your Reflex project for web and mobile",
|
"description": "Obelisk provides an easy way to develop and deploy your Reflex project for web and mobile",
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [ ./hexa-cards.nix ];
|
||||||
|
|
||||||
services.home-assistant = {
|
services.home-assistant = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.home-assistant.overrideAttrs (
|
package = pkgs.home-assistant.overrideAttrs (
|
||||||
|
@ -43,6 +45,9 @@
|
||||||
type = "weather-forecast";
|
type = "weather-forecast";
|
||||||
entity = "weather.dwd_darmstadt";
|
entity = "weather.dwd_darmstadt";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
type = "custom:sun-card";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
type = "picture";
|
type = "picture";
|
||||||
image = "https://www.dwd.de/DWD/wetter/radar/radfilm_hes_akt.gif";
|
image = "https://www.dwd.de/DWD/wetter/radar/radfilm_hes_akt.gif";
|
||||||
|
@ -56,6 +61,10 @@
|
||||||
"sensor.kalliope_battery_state"
|
"sensor.kalliope_battery_state"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
type = "custom:rmv-card";
|
||||||
|
entity = "sensor.darmstadt_schulstrasse";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -70,6 +79,13 @@
|
||||||
proxyPass = "http://[::1]:8123";
|
proxyPass = "http://[::1]:8123";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
|
locations."/custom/" = {
|
||||||
|
alias = "/run/hass/";
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_buffering off;
|
||||||
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
35
nixos/roles/home-assistant/hexa-cards.nix
Normal file
35
nixos/roles/home-assistant/hexa-cards.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
nur = import pkgs.sources.hexa-nur-packages { };
|
||||||
|
|
||||||
|
mkLovelaceModule = name: {
|
||||||
|
url = "custom/${name}.js?${nur.hassLovelaceModules."${name}".version}";
|
||||||
|
type = "module";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
# Lovelace Cards
|
||||||
|
"d /run/hass 0700 nginx nginx"
|
||||||
|
"L+ /run/hass/mini-graph-card.js - - - - ${nur.hassLovelaceModules.mini-graph-card}/mini-graph-card-bundle.js"
|
||||||
|
"L+ /run/hass/mini-media-player.js - - - - ${nur.hassLovelaceModules.mini-media-player}/mini-media-player-bundle.js"
|
||||||
|
"L+ /run/hass/multiple-entity-row.js - - - - ${nur.hassLovelaceModules.multiple-entity-row}/multiple-entity-row.js"
|
||||||
|
"L+ /run/hass/sun-card.js - - - - ${nur.hassLovelaceModules.sun-card}/sun-card.js"
|
||||||
|
"L+ /run/hass/swipe-navigation.js - - - - ${nur.hassLovelaceModules.swipe-navigation}/swipe-navigation.js"
|
||||||
|
"L+ /run/hass/rmv-card.js - - - - ${nur.hassLovelaceModules.rmv-card}/rmv-card.js"
|
||||||
|
"L+ /run/hass/weather-card-chart.js - - - - ${nur.hassLovelaceModules.weather-card-chart}/weather-card-chart.js"
|
||||||
|
];
|
||||||
|
|
||||||
|
services.home-assistant.config.lovelace = {
|
||||||
|
resources = [
|
||||||
|
(mkLovelaceModule "mini-graph-card")
|
||||||
|
(mkLovelaceModule "mini-media-player")
|
||||||
|
(mkLovelaceModule "multiple-entity-row")
|
||||||
|
(mkLovelaceModule "rmv-card")
|
||||||
|
(mkLovelaceModule "weather-card-chart")
|
||||||
|
(mkLovelaceModule "sun-card")
|
||||||
|
(mkLovelaceModule "swipe-navigation")
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue