{ config, pkgs, lib, ... }: let cfg = config.ctucxConfig.programs.ddcutil; in { options = { ctucxConfig.programs.ddcutil = { enable = lib.mkEnableOption "ddcutil"; }; }; config = lib.mkIf cfg.enable { boot.kernelModules = [ "i2c-dev" ]; security.sudo.extraRules= [ { users = [ "katja" ]; commands = [ { command = "${pkgs.ddcutil}/bin/ddcutil" ; options= [ "NOPASSWD" ]; } ]; } ]; home-manager.users.katja = { home.packages = [ pkgs.ddcutil ]; }; }; }