nixos_dots/modules/nixos/xserver.nix

56 lines
1.8 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Не совсем понял как менять тему в sddm. Но мне оно не надо. Оставлю ссылки
# https://www.reddit.com/r/NixOS/comments/14sb6s2/sddm_themes_finally_did_a_dumb_workaround/
# https://www.reddit.com/r/NixOS/comments/14dlvbr/sddm_theme/
{ pkgs, ... }: {
services.displayManager = {
defaultSession = "none+bspwm"; # only effective for GDM, LightDM and SDDM
sddm = {
# Чтоб задать аватарку юзеру, надо отправить png файл такой командой:
# sudo cp image.png /var/lib/AccountsService/icons/username
# Тоесть именно username, без .png в конце
enable = true;
# package = pkgs.kdePackages.sddm; # qt6 sddm
theme = "chili";
};
};
services.libinput = {
enable = true;
mouse = {
accelProfile = "flat";
scrollMethod = "button";
scrollButton = 9; # Узнать айди можно через `xev -event button | grep button`
};
touchpad = {
accelProfile = "flat";
};
};
services.xserver = {
enable = true;
windowManager = {
bspwm.enable = true;
i3.enable = true; # i3-gaps доступен в стоке в новых версиях
};
xkb = {
layout = "us,ru";
variant = "";
options = "grp:caps_toggle"; # Менять язык на CapsLock
};
displayManager.sessionCommands = ''
xsetroot -cursor_name left_ptr
'';
# Мб видеодрайвер можно не указывать
# https://discourse.nixos.org/t/amd-gpu-optimal-settings/27648/3
# videoDrivers = [ "nvidia" ]; # https://nixos.wiki/wiki/Nvidia
videoDrivers = [ "amdgpu" ]; # https://nixos.wiki/wiki/AMD_GPU
deviceSection = ''Option "TearFree" "True"'';
};
}