mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:36 +01:00
fix(openrgb): apply declarative off profile at boot (#502)
Assisted-by: DeepSeek Harness (deepseek-flash)
This commit is contained in:
1 parent
f3b741f5a0
commit
bc0df6a800
3 files changed
+27
-6
No files matched your search
@@ -32,6 +32,7 @@ in
|
||||
|
||||
./preservation.nix
|
||||
./secureboot.nix
|
||||
./openrgb
|
||||
|
||||
./restic.nix
|
||||
|
||||
@@ -117,12 +118,6 @@ in
|
||||
# works without sudo.
|
||||
hardware.i2c.enable = true;
|
||||
|
||||
# The board's ARGB controller is a USB HID device (MSI Mystic Light, 1462:7e01). This
|
||||
# module installs openrgb with its udev rules and runs `openrgb --server`, so the GUI and
|
||||
# the CLI reach the board without root. `motherboard` needs no value here: it follows
|
||||
# hardware.cpu.intel.updateMicrocode, which hardware-configuration.nix already sets.
|
||||
services.hardware.openrgb.enable = true;
|
||||
|
||||
# Re-evaluate after the Insta360 Link firmware or the kernel's uvcvideo changes.
|
||||
powerManagement.resumeCommands = ''
|
||||
# Insta360 Link may stay enumerated with a stalled UVC endpoint after S3 resume.
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
offProfile = ./off.json;
|
||||
in
|
||||
{
|
||||
# The MSI ARGB controller loses its state on power loss and reverts to the
|
||||
# firmware default. Load an OpenRGB profile after detection so the service
|
||||
# restores the desired Direct/black state on every boot.
|
||||
services.hardware.openrgb = {
|
||||
enable = true;
|
||||
startupProfile = "off";
|
||||
};
|
||||
|
||||
# Keep the profile checked in, and install it before the server starts. An
|
||||
# empty controller list with base_color = 0 makes OpenRGB apply black to every
|
||||
# detected controller.
|
||||
systemd.services.openrgb.preStart = ''
|
||||
${pkgs.coreutils}/bin/install -Dm0644 ${offProfile} /var/lib/OpenRGB/profiles/off.json
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"profile_name": "off",
|
||||
"profile_version": 6,
|
||||
"controllers": [],
|
||||
"base_color": 0
|
||||
}
|
||||
Reference in new issue
Block a user