From b3700b1d9f46ecc40c75d2d9946ad68af6a59855 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Thu, 15 Oct 2026 21:39:18 +0800 Subject: [PATCH] feat(ai): control external monitors over DDC/CI The module loads i2c-dev and grants /dev/i2c-* to the i2c group and locally logged-in users, so ddcutil no longer needs root. Assisted-by: DeepSeek Harness (deepseek-flash) --- hosts/idols-ai/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hosts/idols-ai/default.nix b/hosts/idols-ai/default.nix index fe72e527..e3b2e6c4 100644 --- a/hosts/idols-ai/default.nix +++ b/hosts/idols-ai/default.nix @@ -81,7 +81,16 @@ in services.smartd.enable = true; # QEMU/KVM(HostCpuOnly) for local VMs. - environment.systemPackages = [ pkgs.qemu_kvm ]; + environment.systemPackages = [ + pkgs.qemu_kvm + pkgs.ddcutil # external monitor control over DDC/CI (brightness, input source) + ]; + + # The external monitors answer DDC/CI on /dev/i2c-*: this loads i2c-dev and installs the + # udev rules that grant the i2c group and locally logged-in users access, so `ddcutil` + # works without sudo. + # https://github.com/ryan4yin/nix-config/issues/447 + hardware.i2c.enable = true; # Re-evaluate after the Insta360 Link firmware or the kernel's uvcvideo changes. powerManagement.resumeCommands = ''