about summary refs log tree commit diff
path: root/nixos/modules/services/x11/desktop-managers
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-05-28 22:05:36 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2020-05-28 22:05:36 +0200
commit03de4c02fbd35d1b730ba0957f71df9a7a82bacf (patch)
tree78ed2f7dfa2efae85c9a76dd53320d875a8ff678 /nixos/modules/services/x11/desktop-managers
parent99d25675152f30caf6354db93f01fac87f640c8f (diff)
parente27e3ae169d4ac64856befb6bbf044f2153e337d (diff)
downloadnixlib-03de4c02fbd35d1b730ba0957f71df9a7a82bacf.tar
nixlib-03de4c02fbd35d1b730ba0957f71df9a7a82bacf.tar.gz
nixlib-03de4c02fbd35d1b730ba0957f71df9a7a82bacf.tar.bz2
nixlib-03de4c02fbd35d1b730ba0957f71df9a7a82bacf.tar.lz
nixlib-03de4c02fbd35d1b730ba0957f71df9a7a82bacf.tar.xz
nixlib-03de4c02fbd35d1b730ba0957f71df9a7a82bacf.tar.zst
nixlib-03de4c02fbd35d1b730ba0957f71df9a7a82bacf.zip
Merge staging-next into staging
Diffstat (limited to 'nixos/modules/services/x11/desktop-managers')
-rw-r--r--nixos/modules/services/x11/desktop-managers/plasma5.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix
index 60ef0159ff1a..6d48b899d231 100644
--- a/nixos/modules/services/x11/desktop-managers/plasma5.nix
+++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix
@@ -158,6 +158,19 @@ in
         example = "vlc";
         description = "Phonon audio backend to install.";
       };
+
+      supportDDC = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          Support setting monitor brightness via DDC.
+          </para>
+          <para>
+          This is not needed for controlling brightness of the internal monitor
+          of a laptop and as it is considered experimental by upstream, it is
+          disabled by default.
+        '';
+      };
     };
 
   };
@@ -184,6 +197,12 @@ in
         };
       };
 
+      # DDC support
+      boot.kernelModules = lib.optional cfg.supportDDC "i2c_dev";
+      services.udev.extraRules = lib.optionalString cfg.supportDDC ''
+        KERNEL=="i2c-[0-9]*", TAG+="uaccess"
+      '';
+
       environment.systemPackages = with pkgs; with qt5; with libsForQt5; with plasma5; with kdeApplications;
         [
           frameworkintegration