feat(system): enable ddcci for external monitor brightness control
Some checks failed
Check / eval (push) Has been cancelled

This commit is contained in:
Bernardo Magri
2026-07-08 22:24:49 +01:00
parent fbd4e0503e
commit 3322db7caf
3 changed files with 32 additions and 0 deletions

View File

@@ -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 = [