From 458ee8f5c73be762a7223a540117021cb8956e71 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 16 Jun 2022 23:57:35 +0200 Subject: [PATCH 1/4] ma: disable nixpkgs-unstable --- makefu/1systems/omo/source.nix | 2 +- makefu/1systems/x/source.nix | 2 +- makefu/2configs/home/ham/default.nix | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/makefu/1systems/omo/source.nix b/makefu/1systems/omo/source.nix index b56e855fc..af508fbd6 100644 --- a/makefu/1systems/omo/source.nix +++ b/makefu/1systems/omo/source.nix @@ -1,6 +1,6 @@ { name="omo"; torrent = true; - unstable = true; + #unstable = true; home-manager = true; } diff --git a/makefu/1systems/x/source.nix b/makefu/1systems/x/source.nix index 05b74a014..ecb1d9962 100644 --- a/makefu/1systems/x/source.nix +++ b/makefu/1systems/x/source.nix @@ -3,7 +3,7 @@ full = true; python = true; hw = true; - unstable = true; + # unstable = true; mic92 = true; clever_kexec = true; home-manager = true; diff --git a/makefu/2configs/home/ham/default.nix b/makefu/2configs/home/ham/default.nix index f63ba3434..f54fd32f7 100644 --- a/makefu/2configs/home/ham/default.nix +++ b/makefu/2configs/home/ham/default.nix @@ -5,7 +5,6 @@ let prefix = (import ./lib).prefix; hassdir = "/var/lib/hass"; - unstable = import {}; in { From a208a3a19178a6e61c1cb2430e903cbd6dc93529 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 17 Jun 2022 22:50:34 +0200 Subject: [PATCH 2/4] nixpkgs: d108690 -> 8b538fc --- krebs/nixpkgs.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index 3e20b2a87..e6dbcf37b 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,9 +1,9 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "d1086907f56c5a6c33c0c2e8dc9f42ef6988294f", - "date": "2022-05-28T12:29:49+02:00", - "path": "/nix/store/56gsa390lyiik6jdapnj98a2ww8af8ig-nixpkgs", - "sha256": "009dc0njvdn5pzcyd8bp4sc9byf70w4msdkv6q2zfdlnh36im1jl", + "rev": "8b538fcb329a7bc3d153962f17c509ee49166973", + "date": "2022-06-15T15:30:32+08:00", + "path": "/nix/store/7r9xwvy1qc2m88cpx8sz494ad08whgqg-nixpkgs", + "sha256": "08797zlq57i8bi8f89j38ymi8nwp5hp0vh62162k526qf6v3paqz", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, From 27f4f6d6dd379e6421c270b1c16dafa00814b579 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 15 Jul 2022 16:40:11 +0200 Subject: [PATCH 3/4] ma ham/project-tracker: init --- .../home/ham/automation/project_tracker.nix | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 makefu/2configs/home/ham/automation/project_tracker.nix diff --git a/makefu/2configs/home/ham/automation/project_tracker.nix b/makefu/2configs/home/ham/automation/project_tracker.nix new file mode 100644 index 000000000..cb279b2fe --- /dev/null +++ b/makefu/2configs/home/ham/automation/project_tracker.nix @@ -0,0 +1,68 @@ +{ lib, ... }: +# uses: +# +let + at_work = "input_boolean.felix_at_work"; + dice_action = "sensor.arbeitszimmer_cube_action"; + project_sensor = "sensor.felix_project"; + hlib = import ../lib; + say = hlib.say.office; + sides = [ "BDK" "LBS6" "random" "BNO" "CyberShield" "ILBS" ]; + hist_stat = state: { + platform = "history_stats"; + name = "Felix Project ${state}"; + entity_id = project_sensor; + inherit state; + type = "time"; + start = "{{ now().replace(hour=0, minute=0, second=0) }}"; + end = "{{ now() }}"; + }; + +in + { + services.home-assistant.config.sensor = map hist_stat (sides ++ ["not at work" "unknown"]); + services.home-assistant.config.automation = [ + { alias = "Felix Project Change"; + trigger = + { + platform = "state"; + entity_id = project_sensor; + # ignore login and log out + not_from = [ "not at work" ]; + not_to = [ "not at work" ]; + }; + + action = (say "Wechsel auf Projekt {{ trigger.to_state.state }}"); + } + ]; + services.home-assistant.config.template = [ + { + trigger = [ + { + platform = "state"; + entity_id = at_work; + } + { + platform = "state"; + attribute = "side"; + entity_id = dice_action; + not_from = ""; + } + ]; + sensor = [ + { name = "Felix Project"; + state = '' + {% set at_work = states('${at_work}') == 'on' %} + {% set side = state_attr('${dice_action}','side') %} + {% if not at_work %}not at work + '' + (lib.concatImapStringsSep "\n" (i: project: + "{% elif side == ${toString (i - 1)} %}${project}") sides) + + '' + {% else %}unknown + {% endif %} + ''; + } + ]; + } + ]; + } From bebf0baf031fca08fde11cc7f840fc885737f5b7 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 20 Jul 2022 08:54:53 +0200 Subject: [PATCH 4/4] ma awesomecfg: disable telegram --- makefu/5pkgs/awesomecfg/full.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makefu/5pkgs/awesomecfg/full.cfg b/makefu/5pkgs/awesomecfg/full.cfg index a86d3ac1f..430c9d511 100644 --- a/makefu/5pkgs/awesomecfg/full.cfg +++ b/makefu/5pkgs/awesomecfg/full.cfg @@ -488,8 +488,8 @@ awful.rules.rules = { properties = { tag = tags[3] } }, { rule = { class = "Signal" }, properties = { tag = tags[4] } }, - { rule = { class = "TelegramDesktop" }, - properties = { tag = tags[4] } }, + -- { rule = { class = "TelegramDesktop" }, + -- properties = { tag = tags[4] } }, { rule = { class = "Element" }, properties = { tag = tags[4] } } }