nixos-config/profiles/xserver.nix

78 lines
2.0 KiB
Nix
Raw Normal View History

2019-08-27 23:41:02 +04:00
{ pkgs, lib, config, ... }:
2020-08-10 01:17:22 +04:00
let
thm = config.lib.base16.theme;
in
2021-02-07 02:38:11 +03:00
with config.deviceSpecific; {
2019-08-27 23:41:02 +04:00
services.xserver = {
enable = true;
2020-08-07 23:27:49 +04:00
# TODO: Disable natural scrolling for external mouse
2019-08-27 23:41:02 +04:00
libinput = {
2021-02-07 02:38:11 +03:00
enable = true;
mouse = {
accelProfile = "flat";
middleEmulation = false;
naturalScrolling = false;
};
touchpad = lib.mkIf isLaptop {
accelProfile = "adaptive";
middleEmulation = true;
naturalScrolling = true;
};
2019-08-27 23:41:02 +04:00
};
2019-09-14 22:12:56 +04:00
# TODO: make settings for laptops with dGPU
2021-02-07 02:38:11 +03:00
videoDrivers = if devInfo.gpu.vendor == "amd" then
2019-09-14 22:12:56 +04:00
[ "amdgpu" ]
2021-02-07 02:38:11 +03:00
else if devInfo.gpu.vendor == "nvidia" then
2019-09-14 22:12:56 +04:00
[ "nvidia" ]
2021-02-07 02:38:11 +03:00
else if devInfo.gpu.vendor == "intel" then
2019-09-14 22:12:56 +04:00
[ "intel" ]
2019-08-27 23:41:02 +04:00
else
[ ];
displayManager.lightdm = {
2020-08-06 00:42:43 +04:00
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]
2021-09-16 01:03:52 +03:00
font = "#${thm.fonts.mono.family}"
font-size = ${thm.fontSizes.header.str}pt
2020-08-10 01:17:22 +04:00
text-color = "#${thm.base0B-hex}"
error-color = "#${thm.base0B-hex}"
2020-08-06 00:42:43 +04:00
background-image = ""
2020-08-10 01:17:22 +04:00
background-color = "#${thm.base00-hex}"
window-color = "#${thm.base01-hex}"
border-color = "#${thm.base0D-hex}"
2020-08-06 00:42:43 +04:00
border-width = 1px
layout-space = 14
2020-08-10 01:17:22 +04:00
password-color = "#${thm.base0B-hex}"
password-background-color = "#${thm.base00-hex}"
2020-08-06 00:42:43 +04:00
'';
};
2019-08-27 23:41:02 +04:00
};
2020-08-04 01:51:37 +04:00
displayManager.autoLogin.enable = !isShared;
displayManager.autoLogin.user = "alukard";
2020-01-15 05:48:39 +04:00
displayManager.defaultSession = "none+i3";
2019-08-27 23:41:02 +04:00
desktopManager.xterm.enable = false;
windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
};
layout = "us,ru";
xkbOptions = "grp:win_space_toggle";
};
}