nixos/services/desktop.nix

37 lines
827 B
Nix
Raw Normal View History

2023-09-11 20:23:04 +02:00
{
config,
lib,
fn,
pkgs,
...
}:
with lib; let
cfg = config.machine;
2023-09-11 20:23:04 +02:00
desktopFiles = fn.lst {
p = toString ./desktop;
b = true;
};
in
{
imports = desktopFiles;
}
// mkIf (elem "desktop" cfg.services) {
services.gvfs.enable = true;
services.xserver = {
layout = "de";
libinput = {
enable = true;
touchpad = {
tapping = true;
disableWhileTyping = false;
naturalScrolling = false;
horizontalScrolling = true;
};
2021-10-28 09:50:49 +02:00
};
};
2023-09-11 20:23:04 +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"
'';
}