hermes: Fix OpenRGB on startup
This commit is contained in:
parent
4abedcce78
commit
203f055aad
2 changed files with 7 additions and 18 deletions
|
|
@ -1,15 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
|
||||||
no-rgb = pkgs.writeScriptBin "no-rgb" ''
|
|
||||||
#!/bin/sh
|
|
||||||
NUM_DEVICES=$(${pkgs.openrgb}/bin/openrgb --list-devices | grep -E '^[0-9]+: ' | wc -l)
|
|
||||||
|
|
||||||
for i in $(seq 0 $(($NUM_DEVICES - 1))); do
|
{
|
||||||
${pkgs.openrgb}/bin/openrgb --device $i --mode static --color 000000
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
# I2C
|
# I2C
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
i2c-tools
|
i2c-tools
|
||||||
|
|
@ -34,12 +25,10 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
startupProfile = "off";
|
startupProfile = "off";
|
||||||
};
|
};
|
||||||
# systemd.services.no-rgb = {
|
|
||||||
# description = "no-rgb";
|
system.activationScripts.openrgbOff = ''
|
||||||
# serviceConfig = {
|
mkdir -p /var/lib/OpenRGB
|
||||||
# ExecStart = "${no-rgb}/bin/no-rgb";
|
cp ${./off.orp} /var/lib/OpenRGB/off.orp
|
||||||
# Type = "oneshot";
|
chmod 0644 /var/lib/OpenRGB/off.orp
|
||||||
# };
|
'';
|
||||||
# wantedBy = [ "multi-user.target" ];
|
|
||||||
# };
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
BIN
machines/hermes/off.orp
Normal file
BIN
machines/hermes/off.orp
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue