all repos — nixfiles @ 43f89c30d09beac4b7dee577dd6bb55f6986eb19

System and user configuration, managed by nix and home-manager

Laptop: Enable autorandr via module

Alan Pearce
commit

43f89c30d09beac4b7dee577dd6bb55f6986eb19

parent

405a26ad786e511ec16fe892b6f43ac64aebf449

1 file changed, 2 insertions(+), 26 deletions(-)

jump to
M modules/hardware/laptop.nixmodules/hardware/laptop.nix
@@ -18,29 +18,9 @@ autorandr
disper ]; - # powerManagement.resumeCommands = '' - # AUTORANDR="autorandr -c" - - # detect_display() - # { - # for X in /tmp/.X11-unix/X*; do - # D="''${X##/tmp/.X11-unix/X}" - # user=$(who | awk -vD="$D" '$5 ~ "\\(:"D"\\)$" {print $1}') - # if [ x"$user" != x"" ]; then - # export DISPLAY=":$D" - # /bin/su -c "''${AUTORANDR}" "$user" - # fi - # done - # } - - # case "$1" in - # thaw|resume) - # detect_display - # ;; - # esac - # ''; + programs.light.enable = true; - programs.light.enable = true; + services.autorandr.enable = true; services.logind.extraConfig = '' IdleAction=suspend
@@ -55,10 +35,6 @@ extraConfig = ''
CPU_SCALING_GOVERNOR_ON_BAT=powersave ''; }; - - services.udev.extraRules = '' - # ACTION=="change", SUBSYSTEM=="drm", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/alan/.Xauthority", RUN+="${pkgs.autorandr}/bin/autorandr -c" - ''; services.xserver = { libinput = {