mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat(traadfri): add traadfri-party script
This commit is contained in:
@@ -6,6 +6,18 @@ in
|
|||||||
{
|
{
|
||||||
imports = [ <niveum/modules/traadfri.nix> ];
|
imports = [ <niveum/modules/traadfri.nix> ];
|
||||||
|
|
||||||
|
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 = {
|
niveum.traadfri = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = "kmein";
|
user = "kmein";
|
||||||
@@ -15,7 +27,7 @@ in
|
|||||||
corridor = 131080;
|
corridor = 131080;
|
||||||
kitchen = 131081;
|
kitchen = 131081;
|
||||||
bedroom = 131082;
|
bedroom = 131082;
|
||||||
living-room = 131086;
|
living-room = living-room-id;
|
||||||
bedside = 131087;
|
bedside = 131087;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user