diff options
Diffstat (limited to 'krebs/2configs')
-rw-r--r-- | krebs/2configs/default.nix | 2 | ||||
-rw-r--r-- | krebs/2configs/save-diskspace.nix | 6 | ||||
-rw-r--r-- | krebs/2configs/shack/glados/automation/announcement.j2 | 28 | ||||
-rw-r--r-- | krebs/2configs/shack/glados/automation/shack-startup.nix | 31 | ||||
-rw-r--r-- | krebs/2configs/shack/glados/default.nix | 4 | ||||
-rw-r--r-- | krebs/2configs/shack/glados/lib/default.nix | 2 | ||||
-rw-r--r-- | krebs/2configs/shack/ssh-keys.nix | 1 |
7 files changed, 59 insertions, 15 deletions
diff --git a/krebs/2configs/default.nix b/krebs/2configs/default.nix index d7d6fbf37..3442272ec 100644 --- a/krebs/2configs/default.nix +++ b/krebs/2configs/default.nix @@ -29,8 +29,8 @@ with import <stockholm/lib>; rxvt_unicode.terminfo ]; + console.keyMap = "us"; i18n = { - consoleKeyMap = "us"; defaultLocale = lib.mkForce "C"; }; diff --git a/krebs/2configs/save-diskspace.nix b/krebs/2configs/save-diskspace.nix index b1416a97a..c70029646 100644 --- a/krebs/2configs/save-diskspace.nix +++ b/krebs/2configs/save-diskspace.nix @@ -3,8 +3,8 @@ { nix.gc.automatic = true; nix.gc.dates = lib.mkDefault "03:10"; - programs.info.enable = false; - programs.man.enable = false; + documentation.info.enable = false; + documentation.man.enable = false; services.journald.extraConfig = "SystemMaxUse=50M"; - services.nixosManual.enable = false; + documentation.nixos.enable = false; } diff --git a/krebs/2configs/shack/glados/automation/announcement.j2 b/krebs/2configs/shack/glados/automation/announcement.j2 new file mode 100644 index 000000000..d3838bb33 --- /dev/null +++ b/krebs/2configs/shack/glados/automation/announcement.j2 @@ -0,0 +1,28 @@ +Willkommen werter Keyholder {{ states("sensor.keyholder") }} in deinem Lieblingshackerspace. + +Es ist {{states("sensor.temperature") | round(1) | replace('.',' Komma ')}} Grad {% if states("sensor.temperature")|float > 25 %}heiss{%elif states("sensor.temperature")|float > 15%}warm{%else%}kalt{%endif%} bei {% if states("sensor.humidity") | int <45 %}trockenen{% elif states("sensor.humidity") | int <65 %}angenehmen{%else%}feuchten{%endif%} {{states("sensor.humidity") | int }} Prozent Luftfeuchtigkeit. + +{% if (states("sensor.fullstand_mate_1")|int == 0) and + states("sensor.fullstand_mate_2")|int == 0 %}ES IST MAHTECALYPSE, BEIDE MAHTESCHÄCHTE SIND LEER! {%if states("sensor.fullstand_mate_cola")| int == 0%} UND SOGAR DIE COLA IST ALLE. Ihr seid sowas von am Arsch!{%else%}Zum Glück gibt es noch Cola, Phew!{%endif%} +{% elif (states("sensor.fullstand_mate_1")|int + states("sensor.fullstand_mate_2")|int) < 5 %} +Der Mahtestand im Automaten ist mit {{states("sensor.fullstand_mate_1")|int + states("sensor.fullstand_mate_2")|int }} verbleibenden Flaschen kritisch! +{% else %} +Im Automaten sind noch {{states("sensor.fullstand_mate_1")|int + states("sensor.fullstand_mate_2")|int }} Flaschen Mahte und {{states("sensor.fullstand_mate_cola")}} Flaschen Cola. +{%endif%} + +Die Wettervorhersage: {{states("sensor.dark_sky_hourly_summary")}} Aktuell {{states("sensor.dark_sky_summary")}} bei {{states("sensor.dark_sky_temperature") | round(1) | replace('.',' Komma ')}} Grad. +Der Stromverbrauch liegt bei {{ (( states("sensor.l1_power")|int + states("sensor.l2_power")|int + states("sensor.l3_power")|int ) / 1000 )| round(1) | replace('.',' Komma ')}} Kilowatt. + +Im Fablab ist die Feinstaubbelastung {% if states("sensor.fablab_particulate_matter_2_5um_concentration") | float > 50 %}hoch!{%elif states("sensor.fablab_particulate_matter_2_5um_concentration") | float > 25 %}mäßig.{% else %}gering.{%endif%} + +{% if is_state("binary_sensor.door_rzl",'on') and is_state("binary_sensor.door_entropia",'on') %} +Das Raumzeitlabor und Entropia haben geöffnet. +{% elif is_state("binary_sensor.door_rzl",'off') and is_state("binary_sensor.door_entropia",'off') %} +Das Raumzeitlabor und Entropia haben geschlossen. +{% elif is_state("binary_sensor.door_rzl",'on') and is_state("binary_sensor.door_entropia",'off') %} +Das Raumzeitlabor hat geöffnet und Entropia hat geschlossen. +{% elif is_state("binary_sensor.door_rzl",'off') and is_state("binary_sensor.door_entropia",'on') %} +Das Raumzeitlabor hat geschlossen und Entropia hat geöffnet. +{%endif%} + +Die Glados Hackerspace Automation wünscht dir und allen Anwesenden einen produktiven und angenehmen Aufenthalt! diff --git a/krebs/2configs/shack/glados/automation/shack-startup.nix b/krebs/2configs/shack/glados/automation/shack-startup.nix index 35314923b..ac7dd4f1e 100644 --- a/krebs/2configs/shack/glados/automation/shack-startup.nix +++ b/krebs/2configs/shack/glados/automation/shack-startup.nix @@ -2,12 +2,20 @@ # binary_sensor.portal_lock # sensor.keyholder # media_player.lounge + +# additional state required on: +# mpd.shack: +# playlist "ansage" +# playlist "lassulus" +# lounge.kiosk.shack: +# playlist "ansage" + let glados = import ../lib; in [ { - alias = "Greet new keyholder for key exchange"; + alias = "Bedanken bei Übernahme von Key"; initial_state = true; trigger = { platform = "state"; @@ -15,15 +23,22 @@ in }; condition = { condition = "template"; - value_template = "{{ trigger.from_state.state != 'No Keyholder' }}"; + value_template = "{{ (trigger.from_state.state != 'No Keyholder') and (trigger.from_state.state != 'No Keyholder') }}"; }; - action = glados.say.kiosk "Danke {{trigger.to_state.state}} für das Übernehmen des Keys von {{trigger.from_state.state}}"; - # action = []; + action = glados.say.kiosk "Danke {{ trigger.to_state.state }} für das Übernehmen des Keys von {{ trigger.from_state.state }}"; + } + { + alias = "Keyholder Begrüßen wenn MPD hoch fährt"; + initial_state = true; + trigger = { + platform = "state"; + from = "unavailable"; + entity_id = "media_player.kiosk"; + }; + action = glados.say.kiosk (builtins.readFile ./announcement.j2); } - { alias = "Start Music on portal lock on"; - # TODO: use "power" trigger trigger = { platform = "state"; entity_id = "binary_sensor.portal_lock"; @@ -61,7 +76,7 @@ in media_content_id = "ansage"; }; } - { delay.seconds = 8; } + { delay.seconds = 8.5; } { service = "media_player.volume_set"; data = { @@ -74,7 +89,7 @@ in data = { entity_id = "media_player.lounge"; media_content_type = "playlist"; - media_content_id = "lassulus superradio"; + media_content_id = "lassulus"; }; } ]; diff --git a/krebs/2configs/shack/glados/default.nix b/krebs/2configs/shack/glados/default.nix index 920f2ed2f..b6bcc8673 100644 --- a/krebs/2configs/shack/glados/default.nix +++ b/krebs/2configs/shack/glados/default.nix @@ -131,11 +131,11 @@ in { }; #conversation = {}; history = {}; - logbook = {}; + #logbook = {}; logger = { default = "info"; }; - recorder = {}; + #recorder = {}; tts = [ { platform = "google_translate"; service_name = "say"; diff --git a/krebs/2configs/shack/glados/lib/default.nix b/krebs/2configs/shack/glados/lib/default.nix index 6d2b7749b..2cfac3daf 100644 --- a/krebs/2configs/shack/glados/lib/default.nix +++ b/krebs/2configs/shack/glados/lib/default.nix @@ -22,7 +22,7 @@ in service = "media_player.turn_on"; data.entity_id = "media_player.${entity}"; } - { delay.seconds = 8; } + { delay.seconds = 4.5; } { service = "tts.say"; entity_id = "media_player.${entity}"; data_template = { diff --git a/krebs/2configs/shack/ssh-keys.nix b/krebs/2configs/shack/ssh-keys.nix index 95c869bc9..f27b5bbc3 100644 --- a/krebs/2configs/shack/ssh-keys.nix +++ b/krebs/2configs/shack/ssh-keys.nix @@ -5,6 +5,7 @@ config.krebs.users.ulrich.pubkey config.krebs.users.raute.pubkey config.krebs.users.xq.pubkey + config.krebs.users.hase.pubkey "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAEAQDb9NPa2Hf51afcG1H13UPbE5E02J8aC9a1sGCRls592wAVlQbmojYR1jWDPA2m32Bsyv0ztqi81zDyndWWZPQVJVBk00VjYBcgk6D5ifqoAuWLzfuHJPWZGOvBf/U74/LNFNUkj1ywjneK7HYTRPXrRBBfBSQNmQzkvue7s599L2vdueZKyjNsMpx2m6nm2SchaMuDskSQut/168JgU1l4M8BeT68Bo4WdelhBYnhSI1a59FGkgdu2SCjyighLQRy2sOH3ksnkHWENPkA+wwQOlKl7R3DsEybrNd4NU9FSwFDyDmdhfv5gJp8UGSFdjAwx43+8zM5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