From 6097c89763f2268223a43f2d63009ec5f563e756 Mon Sep 17 00:00:00 2001 From: Chris Toph Date: Thu, 6 Mar 2025 19:40:27 -0500 Subject: [PATCH] Add ddcutil configuration for monitor controls --- hosts/common/optional/ddcutil.nix | 17 +++++++++++++++++ hosts/nixos/rune/default.nix | 1 + 2 files changed, 18 insertions(+) create mode 100644 hosts/common/optional/ddcutil.nix diff --git a/hosts/common/optional/ddcutil.nix b/hosts/common/optional/ddcutil.nix new file mode 100644 index 0000000..760df8b --- /dev/null +++ b/hosts/common/optional/ddcutil.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: +{ + environment.systemPackages = builtins.attrValues { + inherit (pkgs) + ddcutil + ; + }; + + # Configurations for ddcutil + hardware.i2c.enable = true; + services.udev = { + enable = true; + extraRules = '' + KERNEL=="i2c-[0-9]*", GROUP="i2c", MODE="0660" + ''; + }; +} diff --git a/hosts/nixos/rune/default.nix b/hosts/nixos/rune/default.nix index e0f8956..a6dac10 100644 --- a/hosts/nixos/rune/default.nix +++ b/hosts/nixos/rune/default.nix @@ -30,6 +30,7 @@ in ## Optional Configs ## "hosts/common/optional/audio.nix" # pipewire and cli controls + "hosts/common/optional/ddcutil.nix" # ddcutil for monitor controls "hosts/common/optional/gaming.nix" # steam, gamescope, gamemode, and related hardware "hosts/common/optional/gnome.nix" # desktop "hosts/common/optional/libvirt.nix" # vm tools