Merge remote-tracking branch 'gum/master'

This commit is contained in:
tv 2022-12-09 14:33:18 +01:00
commit 581c20be8f
10 changed files with 58 additions and 17 deletions

View File

@ -0,0 +1,11 @@
{ lib, pkgs,stdenv }:
let
src = pkgs.fetchFromGitHub {
owner = "makefu";
repo = "ukrepl";
rev = "0baa5cc4d5c3c17af704b69a800dd1f520ded8e3";
hash = "sha256:1lnhkf02f18fvf3l2fcszvs4x115lql17akabd5ph9ff9z33k8rv";
};
in
pkgs.writers.writePython3Bin "ukrepl" {} (builtins.readFile (src + "/ukrepl"))

View File

@ -0,0 +1,13 @@
{
systemd.services.look-up = {
startAt = "*:30";
serviceConfig = {
ExecStart= pkgs.writeDash "look-up" ''
set -x
eval "export '$(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(${pkgs.procps}/bin/pgrep -u ${user} ${window-manager})/environ)'"
${pkgs.libnotify}/bin/notify-send -u critical -t 9999999 'look up once in a while'
'';
User = user;
};
};
}

View File

@ -88,7 +88,7 @@ in {
duschfenster_lang_offen.name = "Duschfenster lange offen"; duschfenster_lang_offen.name = "Duschfenster lange offen";
ist_sommer = { ist_sommer = {
name = "Es ist Sommer"; name = "Es ist Sommer";
initial = true; # TODO initial = false; # TODO
}; };
}; };

View File

@ -47,6 +47,9 @@ in {
{ service = "media_player.media_stop"; { service = "media_player.media_stop";
target.entity_id = all_media_player; target.entity_id = all_media_player;
} }
{ service = "script.turn_on";
target.entity_id = "script.alle_heizungen_aus";
}
]; ];
} }
]; ];

View File

@ -18,6 +18,7 @@ in {
# ./multi/flurlicht.nix # ./multi/flurlicht.nix
./multi/kurzzeitwecker.nix ./multi/kurzzeitwecker.nix
./multi/the_playlist.nix ./multi/the_playlist.nix
./multi/heizung.nix
# ./multi/fliegen-couter.nix # ./multi/fliegen-couter.nix
./device_tracker/openwrt.nix ./device_tracker/openwrt.nix
@ -192,5 +193,10 @@ in {
configDir = hassdir; configDir = hassdir;
}; };
krebs.secret.files."hass-secrets" = {
source-path = toString <secrets> + "/hass/secrets.yaml";
path = "/var/lib/hass/secrets.yaml";
owner.name = "hass";
};
state = [ "/var/lib/hass/known_devices.yaml" ]; state = [ "/var/lib/hass/known_devices.yaml" ];
} }

View File

@ -0,0 +1,11 @@
{
services.home-assistant.config =
{
# 18 Grad
script.alle_heizungen_aus.sequence = [{
service = "climate.set_temperature";
target.entity_id = [ "climate.wohnzimmer_heizung" ];
data.temperature = "18.0";
}];
};
}

View File

@ -4,5 +4,7 @@
{ platform = "dwd_weather_warnings"; { platform = "dwd_weather_warnings";
region_name = "Stadt Stuttgart"; region_name = "Stadt Stuttgart";
} }
{ platform = "nina";
}
]; ];
} }

View File

@ -4,8 +4,7 @@
services.home-assistant.config.sensor = services.home-assistant.config.sensor =
[ [
{ platform = "darksky"; { platform = "darksky";
api_key = lib.removeSuffix "\n" api_key = "!secret darksky";
(builtins.readFile <secrets/hass/darksky.apikey>);
language = "de"; language = "de";
monitored_conditions = [ monitored_conditions = [
"summary" "icon" "summary" "icon"
@ -21,5 +20,11 @@
units = "si" ; units = "si" ;
scan_interval = "00:30:00"; scan_interval = "00:30:00";
} }
{
platform = "open_meteo";
}
{
platform = "met";
}
]; ];
} }

View File

@ -12,6 +12,7 @@ let
in { in {
imports = [ imports = [
./gui/base.nix ./gui/base.nix
./gui/look-up.nix
./fetchWallpaper.nix ./fetchWallpaper.nix
./zsh-user.nix ./zsh-user.nix
./tools/core.nix ./tools/core.nix
@ -72,15 +73,4 @@ in {
location.latitude = 48.7; location.latitude = 48.7;
location.longitude = 9.1; location.longitude = 9.1;
systemd.services.look-up = {
startAt = "*:30";
serviceConfig = {
ExecStart= pkgs.writeDash "look-up" ''
set -x
eval "export '$(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(${pkgs.procps}/bin/pgrep -u ${user} ${window-manager})/environ)'"
${pkgs.libnotify}/bin/notify-send -u critical -t 9999999 'look up once in a while'
'';
User = user;
};
};
} }

View File

@ -2,7 +2,7 @@
with pkgs.python3Packages; with pkgs.python3Packages;
buildPythonApplication rec { buildPythonApplication rec {
name = "airsensor-py-${version}"; name = "airsensor-py-${version}";
version = "2017-12-05"; version = "1.0.0";
propagatedBuildInputs = [ propagatedBuildInputs = [
pyusb pyusb
click click
@ -11,7 +11,7 @@ buildPythonApplication rec {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "makefu"; owner = "makefu";
repo = "airsensor-py"; repo = "airsensor-py";
rev = "7ac5f185dc848fca1b556e4c0396dd73f6a93995"; rev = "1.0.0";
sha256 = "0387b025y8kb0zml7916p70hmzc3y18kqh46b9xv5qayljxymq2w"; sha256 = "1jpvvl965bg3ymvr58c433jyy0smczn65fnqsskxn7basznii5g8";
}; };
} }