From c089f89eaaef4ece00f579c2e08c80b3eb3237dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Sat, 24 Oct 2020 13:30:51 +0200 Subject: [PATCH] feat(traadfri): add traadfri-party script --- configs/traadfri.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/configs/traadfri.nix b/configs/traadfri.nix index d68dd96..65a1910 100644 --- a/configs/traadfri.nix +++ b/configs/traadfri.nix @@ -6,6 +6,18 @@ in { imports = [ ]; + environment.systemPackages = [ + (pkgs.writers.writeDashBin "traadfri-party" '' + while true; do + for color in $(traadfri colours | shuf); do + echo "$color" + traadfri group "''${2:-${toString living-room-id}}" --on --colour="$color" + sleep "''${1:-2}" + done + done + '') + ]; + niveum.traadfri = { enable = true; user = "kmein"; @@ -15,7 +27,7 @@ in corridor = 131080; kitchen = 131081; bedroom = 131082; - living-room = 131086; + living-room = living-room-id; bedside = 131087; }; };