2023-09-09 22:50:25 +02:00
|
|
|
{ config, lib, fn, pkgs, ... }:
|
2019-05-04 13:47:21 +02:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.machine;
|
2023-09-09 22:50:25 +02:00
|
|
|
desktopFiles = fn.lst { p = (toString ./desktop); b = true; };
|
|
|
|
in {
|
|
|
|
imports = desktopFiles;
|
|
|
|
} // mkIf (elem "desktop" cfg.services) {
|
2019-09-05 15:24:54 +02:00
|
|
|
services.gvfs.enable = true;
|
2019-05-04 13:47:21 +02:00
|
|
|
services.xserver = {
|
|
|
|
layout = "de";
|
|
|
|
libinput = {
|
|
|
|
enable = true;
|
2021-10-28 09:50:49 +02:00
|
|
|
touchpad = {
|
|
|
|
tapping = true;
|
|
|
|
disableWhileTyping = false;
|
|
|
|
naturalScrolling = false;
|
|
|
|
horizontalScrolling = true;
|
|
|
|
};
|
2019-05-04 13:47:21 +02:00
|
|
|
};
|
|
|
|
};
|
2023-08-26 08:04:11 +02:00
|
|
|
services.udev.extraRules = ''
|
|
|
|
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness"
|
|
|
|
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chmod 664 /sys/class/backlight/%k/brightness"
|
|
|
|
'';
|
2019-05-04 13:47:21 +02:00
|
|
|
}
|