From fcb5d44b931b777aaf62d68f31c0a5142c23363c Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 6 Nov 2022 09:57:21 +0100 Subject: ma gui: restructure main-laptop --- makefu/2configs/gui/look-up.nix | 13 +++++++++++++ makefu/2configs/main-laptop.nix | 12 +----------- 2 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 makefu/2configs/gui/look-up.nix diff --git a/makefu/2configs/gui/look-up.nix b/makefu/2configs/gui/look-up.nix new file mode 100644 index 000000000..d27f5cff7 --- /dev/null +++ b/makefu/2configs/gui/look-up.nix @@ -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; + }; + }; +} diff --git a/makefu/2configs/main-laptop.nix b/makefu/2configs/main-laptop.nix index cb78c823f..a7181cfe9 100644 --- a/makefu/2configs/main-laptop.nix +++ b/makefu/2configs/main-laptop.nix @@ -12,6 +12,7 @@ let in { imports = [ ./gui/base.nix + ./gui/look-up.nix ./fetchWallpaper.nix ./zsh-user.nix ./tools/core.nix @@ -72,15 +73,4 @@ in { location.latitude = 48.7; 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; - }; - }; } -- cgit v1.2.3 From ae39dfcefee2fe3cb369dabed074f14f5af7d6b5 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 17 Nov 2022 13:43:18 +0100 Subject: airsensor-py: fix py39 issues --- makefu/5pkgs/airsensor-py/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/makefu/5pkgs/airsensor-py/default.nix b/makefu/5pkgs/airsensor-py/default.nix index 4eae26c0d..86ea22d8d 100644 --- a/makefu/5pkgs/airsensor-py/default.nix +++ b/makefu/5pkgs/airsensor-py/default.nix @@ -2,7 +2,7 @@ with pkgs.python3Packages; buildPythonApplication rec { name = "airsensor-py-${version}"; - version = "2017-12-05"; + version = "1.0.0"; propagatedBuildInputs = [ pyusb click @@ -11,7 +11,7 @@ buildPythonApplication rec { src = fetchFromGitHub { owner = "makefu"; repo = "airsensor-py"; - rev = "7ac5f185dc848fca1b556e4c0396dd73f6a93995"; - sha256 = "0387b025y8kb0zml7916p70hmzc3y18kqh46b9xv5qayljxymq2w"; + rev = "1.0.0"; + sha256 = "1jpvvl965bg3ymvr58c433jyy0smczn65fnqsskxn7basznii5g8"; }; } -- cgit v1.2.3 From 217dffa8efce1db7618905e780c64eacf0d63d41 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 4 Dec 2022 21:53:01 +0100 Subject: ma ham: add heizung --- makefu/2configs/home/ham/automation/fenster_auf.nix | 2 +- makefu/2configs/home/ham/automation/shutdown_button.nix | 3 +++ makefu/2configs/home/ham/default.nix | 6 ++++++ makefu/2configs/home/ham/multi/heizung.nix | 11 +++++++++++ makefu/2configs/home/ham/sensor/dwd.nix | 2 ++ makefu/2configs/home/ham/sensor/outside.nix | 9 +++++++-- 6 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 makefu/2configs/home/ham/multi/heizung.nix diff --git a/makefu/2configs/home/ham/automation/fenster_auf.nix b/makefu/2configs/home/ham/automation/fenster_auf.nix index b3682fe0c..698327ff4 100644 --- a/makefu/2configs/home/ham/automation/fenster_auf.nix +++ b/makefu/2configs/home/ham/automation/fenster_auf.nix @@ -88,7 +88,7 @@ in { duschfenster_lang_offen.name = "Duschfenster lange offen"; ist_sommer = { name = "Es ist Sommer"; - initial = true; # TODO + initial = false; # TODO }; }; diff --git a/makefu/2configs/home/ham/automation/shutdown_button.nix b/makefu/2configs/home/ham/automation/shutdown_button.nix index ec1a25567..ec84bbe94 100644 --- a/makefu/2configs/home/ham/automation/shutdown_button.nix +++ b/makefu/2configs/home/ham/automation/shutdown_button.nix @@ -47,6 +47,9 @@ in { { service = "media_player.media_stop"; target.entity_id = all_media_player; } + { service = "script.turn_on"; + target.entity_id = "script.alle_heizungen_aus"; + } ]; } ]; diff --git a/makefu/2configs/home/ham/default.nix b/makefu/2configs/home/ham/default.nix index b08152935..861ec27aa 100644 --- a/makefu/2configs/home/ham/default.nix +++ b/makefu/2configs/home/ham/default.nix @@ -18,6 +18,7 @@ in { # ./multi/flurlicht.nix ./multi/kurzzeitwecker.nix ./multi/the_playlist.nix + ./multi/heizung.nix # ./multi/fliegen-couter.nix ./device_tracker/openwrt.nix @@ -192,5 +193,10 @@ in { configDir = hassdir; }; + krebs.secret.files."hass-secrets" = { + source-path = toString + "/hass/secrets.yaml"; + path = "/var/lib/hass/secrets.yaml"; + owner.name = "hass"; + }; state = [ "/var/lib/hass/known_devices.yaml" ]; } diff --git a/makefu/2configs/home/ham/multi/heizung.nix b/makefu/2configs/home/ham/multi/heizung.nix new file mode 100644 index 000000000..73f90dfe0 --- /dev/null +++ b/makefu/2configs/home/ham/multi/heizung.nix @@ -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"; + }]; + }; +} diff --git a/makefu/2configs/home/ham/sensor/dwd.nix b/makefu/2configs/home/ham/sensor/dwd.nix index c1d55d03c..623f099a3 100644 --- a/makefu/2configs/home/ham/sensor/dwd.nix +++ b/makefu/2configs/home/ham/sensor/dwd.nix @@ -4,5 +4,7 @@ { platform = "dwd_weather_warnings"; region_name = "Stadt Stuttgart"; } + { platform = "nina"; + } ]; } diff --git a/makefu/2configs/home/ham/sensor/outside.nix b/makefu/2configs/home/ham/sensor/outside.nix index 332746be8..d05e8a1f6 100644 --- a/makefu/2configs/home/ham/sensor/outside.nix +++ b/makefu/2configs/home/ham/sensor/outside.nix @@ -4,8 +4,7 @@ services.home-assistant.config.sensor = [ { platform = "darksky"; - api_key = lib.removeSuffix "\n" - (builtins.readFile ); + api_key = "!secret darksky"; language = "de"; monitored_conditions = [ "summary" "icon" @@ -21,5 +20,11 @@ units = "si" ; scan_interval = "00:30:00"; } + { + platform = "open_meteo"; + } + { + platform = "met"; + } ]; } -- cgit v1.2.3 From 1df762657baf7d0c27a178113e613c94e6b12aa3 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 5 Dec 2022 16:17:24 +0100 Subject: k pkgs.ukrepl: init --- krebs/5pkgs/simple/ukrepl.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 krebs/5pkgs/simple/ukrepl.nix diff --git a/krebs/5pkgs/simple/ukrepl.nix b/krebs/5pkgs/simple/ukrepl.nix new file mode 100644 index 000000000..bdea4181f --- /dev/null +++ b/krebs/5pkgs/simple/ukrepl.nix @@ -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")) + -- cgit v1.2.3