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, ... }:
|
||||
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
|
||||
environment.systemPackages = with pkgs; [
|
||||
i2c-tools
|
||||
|
|
@ -34,12 +25,10 @@ in
|
|||
enable = true;
|
||||
startupProfile = "off";
|
||||
};
|
||||
# systemd.services.no-rgb = {
|
||||
# description = "no-rgb";
|
||||
# serviceConfig = {
|
||||
# ExecStart = "${no-rgb}/bin/no-rgb";
|
||||
# Type = "oneshot";
|
||||
# };
|
||||
# wantedBy = [ "multi-user.target" ];
|
||||
# };
|
||||
|
||||
system.activationScripts.openrgbOff = ''
|
||||
mkdir -p /var/lib/OpenRGB
|
||||
cp ${./off.orp} /var/lib/OpenRGB/off.orp
|
||||
chmod 0644 /var/lib/OpenRGB/off.orp
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
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