nixos-config/modules/xserver.nix
Dmitriy Kholkin e4d5264913 changes
2020-08-04 01:51:37 +04:00

80 lines
2.1 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.

{ pkgs, lib, config, ... }:
with rec {
inherit (config) deviceSpecific themes;
};
with deviceSpecific; with themes; {
services.xserver = {
enable = true;
# enableTCP = true;
libinput = {
enable = isLaptop;
# sendEventsMode = "disabled-on-external-mouse";
middleEmulation = true;
accelProfile = lib.mkIf (!isLaptop) "flat";
naturalScrolling = true;
};
# TODO: make settings for laptops with dGPU
videoDrivers = if video == "amd" then
[ "amdgpu" ]
else if video == "nvidia" then
[ "nvidia" ]
else if video == "intel" then
[ "intel" ]
else
[ ];
#TODO: исправить проблему с greeter'ом
displayManager.lightdm = {
enable = true;
greeter.enable = isShared;
# greeters.mini = {
# enable = isShared;
# user = "alukard";
# extraConfig = ''
# [greeter]
# show-password-label = true
# password-label-text = Welcome, Alukard
# invalid-password-text = Are you sure?
# show-input-cursor = false
# password-alignment = right
# [greeter-theme]
# font = "Roboto Mono"
# font-size = 14pt
# text-color = "${colors.green}"
# error-color = "${colors.green}"
# background-image = ""
# background-color = "${colors.bg}"
# window-color = "${colors.dark}"
# border-color = "${colors.blue}"
# border-width = 1px
# layout-space = 14
# password-color = "${colors.green}"
# password-background-color = "${colors.bg}"
# '';
# };
};
displayManager.autoLogin.enable = !isShared;
displayManager.autoLogin.user = "alukard";
displayManager.defaultSession = "none+i3";
desktopManager.xterm.enable = false;
windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
};
layout = "us,ru";
xkbOptions = "grp:win_space_toggle";
};
environment.systemPackages = if video == "amd" then
[ (pkgs.mesa.override { enableRadv = true; }) ]
else
[ ];
}