From 03753db65f3761454b5cfff20f0ac1c5e737d8a0 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 24 Dec 2022 23:35:05 +0100 Subject: ma ham: enable find_phone, urlaub --- makefu/2configs/home/ham/automation/find_phone.nix | 32 ++++++++++++++++++++++ makefu/2configs/home/ham/default.nix | 7 +++-- 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 makefu/2configs/home/ham/automation/find_phone.nix (limited to 'makefu/2configs') diff --git a/makefu/2configs/home/ham/automation/find_phone.nix b/makefu/2configs/home/ham/automation/find_phone.nix new file mode 100644 index 000000000..d94942c9f --- /dev/null +++ b/makefu/2configs/home/ham/automation/find_phone.nix @@ -0,0 +1,32 @@ +{ + services.home-assistant.config.script = { + find_felix_phone.sequence = [ + { + service = "notify.mobile_app_pixel_3a"; + data = { + title= "Finde Mich!"; + message= "Such Such Such"; + data = { + ttl = 0; + priority = "high"; + channel = "alarm_stream"; + }; + }; + } + ]; + find_tablet.sequence = [ + { + service = "notify.mobile_app_nova3"; + data = { + title = "Finde Mich!"; + message = "Such Such Such"; + data = { + ttl = 0; + priority = "high"; + channel = "alarm_stream"; + }; + }; + } + ]; + }; +} diff --git a/makefu/2configs/home/ham/default.nix b/makefu/2configs/home/ham/default.nix index 861ec27aa..ca5fcd17c 100644 --- a/makefu/2configs/home/ham/default.nix +++ b/makefu/2configs/home/ham/default.nix @@ -44,9 +44,10 @@ in { ./automation/wohnzimmer_rf_fernbedienung.nix # ./automation/ladestecker_timer.nix ./automation/flurlicht.nix - ./automation/giesskanne.nix - ./automation/pflanzen_giessen_erinnerung.nix - # ./automation/urlaub.nix + # ./automation/giesskanne.nix + # ./automation/pflanzen_giessen_erinnerung.nix + ./automation/find_phone.nix + ./automation/urlaub.nix ./automation/moodlight.nix ./automation/shutdown_button.nix ./automation/project_tracker.nix -- cgit v1.2.3 From 2f14e6f8426c2b817aa1bcafd4a21e2b977cd64f Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 24 Dec 2022 23:55:15 +0100 Subject: ma tools/all: disable android-pentest --- makefu/2configs/tools/all.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'makefu/2configs') diff --git a/makefu/2configs/tools/all.nix b/makefu/2configs/tools/all.nix index 37673768a..3086a0bb2 100644 --- a/makefu/2configs/tools/all.nix +++ b/makefu/2configs/tools/all.nix @@ -1,6 +1,6 @@ { imports = [ - ./android-pentest.nix + # ./android-pentest.nix ./consoles.nix ./core-gui.nix ./core.nix -- cgit v1.2.3 From ed1690d79318d61b10a8ea881989a4d2708c9b42 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 24 Dec 2022 23:58:59 +0100 Subject: ma home: enable minidlna for testing, cleanup --- makefu/2configs/home/3dprint.nix | 2 +- makefu/2configs/home/ham/automation/urlaub.nix | 12 ------------ makefu/2configs/home/ham/media/arbeitszimmer_matrix.nix | 6 ++++++ makefu/2configs/home/music.nix | 10 +++++++++- 4 files changed, 16 insertions(+), 14 deletions(-) (limited to 'makefu/2configs') diff --git a/makefu/2configs/home/3dprint.nix b/makefu/2configs/home/3dprint.nix index 859a18840..09f2ce6fd 100644 --- a/makefu/2configs/home/3dprint.nix +++ b/makefu/2configs/home/3dprint.nix @@ -9,7 +9,7 @@ # also ensure that the webcam always comes up under the same name services.udev.extraRules = '' SUBSYSTEM=="vchiq",GROUP="video",MODE="0660" - SUBSYSTEM=="video4linux", ATTR{name}=="UVC Camera (046d:0825)",SYMLINK+="web_cam", MODE="0666", GROUP="video" + KERNEL=="video*",ATTRS{vendor}=="0x046d", ATTRS{device}=="0x0825", GROUP="video", SYMLINK+="web_cam" ''; systemd.services.octoprint = { path = [ pkgs.libraspberrypi ]; diff --git a/makefu/2configs/home/ham/automation/urlaub.nix b/makefu/2configs/home/ham/automation/urlaub.nix index 7f47c9da5..019e65d25 100644 --- a/makefu/2configs/home/ham/automation/urlaub.nix +++ b/makefu/2configs/home/ham/automation/urlaub.nix @@ -11,18 +11,6 @@ let weihnachtslicht = "light.wohnzimmer_fenster_lichterkette_licht"; fernsehlicht = "light.wled"; - all_lights = [ - schranklicht weihnachtslicht fernsehlicht - # extra lights to also turn off - # wohnzimmer - "light.wohnzimmer_komode_osram" - "light.wohnzimmer_stehlampe_osram" - # arbeitszimmer - "light.wled_4" - "light.arbeitszimmer_schrank_dimmer" - "light.arbeitszimmer_pflanzenlicht" - ]; - final_off = "00:37"; turn_on = entity_id: offset: diff --git a/makefu/2configs/home/ham/media/arbeitszimmer_matrix.nix b/makefu/2configs/home/ham/media/arbeitszimmer_matrix.nix index 26fec370f..11d13886e 100644 --- a/makefu/2configs/home/ham/media/arbeitszimmer_matrix.nix +++ b/makefu/2configs/home/ham/media/arbeitszimmer_matrix.nix @@ -63,6 +63,12 @@ in (remote_action "b9" [ { service = "rest_command.good_song"; } ]) (remote_action "b10" [ { service = "rest_command.bad_song"; } ]) + (remote_action "b11" [ + { + service = "script.turn_on"; + target.entity_id = "script.find_felix_phone"; + } + ]) (remote_action "3" ((say "Starte Lass") ++ [ diff --git a/makefu/2configs/home/music.nix b/makefu/2configs/home/music.nix index 205b47fec..f3b9f50f1 100644 --- a/makefu/2configs/home/music.nix +++ b/makefu/2configs/home/music.nix @@ -9,7 +9,8 @@ in MusicFolder = "/media/cryptX/music/kinder"; Address = "0.0.0.0"; }; - systemd.services.navidrome.after = [ "media-cryptX.mount" ]; + systemd.services.navidrome.after = [ "media-cryptX.mount" "cryptsetup.target" +"local-fs.target" "remote-fs.target" ]; state = [ "/var/lib/navidrome" ]; # networking.firewall.allowedTCPPorts = [ 4040 ]; @@ -27,4 +28,11 @@ in locations."/".proxyWebsockets = true; }; networking.firewall.allowedTCPPorts = [ port ]; + # also configure dlna + services.minidlna.enable = true; + services.minidlna.settings = { + inotify = "yes"; + friendly_name = "omo"; + media_dir = [ "A,/media/cryptX/music" ]; + }; } -- cgit v1.2.3