File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 189189 } ;
190190 } ;
191191
192+ systemd . user . services . brightness-reset = {
193+ description = "Reset monitor brightness to 100% on logout" ;
194+ partOf = [ "graphical-session.target" ] ;
195+ wantedBy = [ "graphical-session.target" ] ;
196+ serviceConfig = {
197+ Type = "oneshot" ;
198+ RemainAfterExit = true ;
199+ ExecStart = "${ pkgs . coreutils } /bin/true" ;
200+ ExecStop = "${ pkgs . ddcutil } /bin/ddcutil setvcp 10 85" ;
201+ } ;
202+ } ;
203+
192204 systemd . user . services . wayout = {
193205 description = "Automatic idle logout manager" ;
194206 after = [ "graphical-session.target" ] ;
Original file line number Diff line number Diff line change 8888
8989 # IRC password prompt
9090 kdePackages . kdialog
91+
92+ ddcutil # for monitor brightness control
9193 ] ;
9294
95+ # enable i2c and set udev rules for monitor brightness control
96+ boot . kernelModules = [ "i2c-dev" ] ;
97+ services . udev . extraRules = ''
98+ KERNEL=="i2c-[0-9]*", RUN+="${ pkgs . coreutils } /bin/chgrp 1000 /dev/%k", RUN+="${ pkgs . coreutils } /bin/chmod 0660 /dev/%k"
99+ '' ;
100+
93101 services = {
94102 avahi . enable = true ;
95103
You can’t perform that action at this time.
0 commit comments