feat(system): enable ddcci for external monitor brightness control
Some checks failed
Check / eval (push) Has been cancelled
Some checks failed
Check / eval (push) Has been cancelled
This commit is contained in:
@@ -145,6 +145,9 @@ in
|
||||
# between earlyoom (true) and smartd (false).
|
||||
services.systembus-notify.enable = true;
|
||||
|
||||
# Enable I2C and DDC/CI by default for external monitor brightness control.
|
||||
nomarchy.hardware.i2c.ddcci = lib.mkDefault true;
|
||||
|
||||
networking.networkmanager.enable = lib.mkDefault true;
|
||||
# OpenVPN support for the VPN menu's import/connect flow (nomarchy-vpn).
|
||||
# WireGuard needs no plugin (NetworkManager imports wg .conf natively);
|
||||
|
||||
@@ -136,6 +136,17 @@ in
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
i2c = {
|
||||
enable = lib.mkEnableOption ''
|
||||
I2C devices support. Enables access to /dev/i2c-* (useful for RGB
|
||||
controllers, sensors, and DDC/CI monitor control)'';
|
||||
|
||||
ddcci = lib.mkEnableOption ''
|
||||
the ddcci-driver kernel module to expose external monitors as standard
|
||||
backlight devices via DDC/CI. This allows brightness keys and swayosd
|
||||
to natively control external displays'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
@@ -221,6 +232,17 @@ in
|
||||
};
|
||||
})
|
||||
|
||||
# ── I2C / DDC/CI ───────────────────────────────────────────────────
|
||||
(lib.mkIf cfg.i2c.enable {
|
||||
hardware.i2c.enable = true;
|
||||
})
|
||||
(lib.mkIf cfg.i2c.ddcci {
|
||||
# The driver needs I2C underneath it
|
||||
hardware.i2c.enable = true;
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.ddcci-driver ];
|
||||
boot.kernelModules = [ "ddcci_backlight" ];
|
||||
})
|
||||
|
||||
# ── Sanity ─────────────────────────────────────────────────────────
|
||||
{
|
||||
assertions = [
|
||||
|
||||
Reference in New Issue
Block a user