nixos-config/nixos/components/gui/xorg/default.nix

88 lines
1.9 KiB
Nix
Raw Normal View History

2019-10-24 02:20:38 +02:00
{ config, pkgs, lib, ... }:
with lib;
2021-11-01 09:20:42 +01:00
{
2019-10-24 02:20:38 +02:00
2023-02-17 00:41:22 +01:00
config = mkIf config.components.gui.enable {
2019-10-24 02:20:38 +02:00
2023-02-17 00:59:29 +01:00
system.custom.fonts.enable = true;
2019-10-24 02:20:38 +02:00
services.xserver = {
enable = true;
# window-manager : Xmonad
# -----------------------
2021-03-06 18:11:11 +01:00
displayManager = {
2022-10-12 16:58:38 +02:00
defaultSession = lib.mkDefault "none+i3";
2021-03-06 18:11:11 +01:00
autoLogin.enable = lib.mkDefault true;
2023-02-17 00:41:22 +01:00
autoLogin.user = config.users.users.mainUser.name;
2021-03-06 18:11:11 +01:00
lightdm.enable = lib.mkDefault true;
};
desktopManager = {
xterm.enable = false;
2021-07-07 04:38:18 +02:00
#gnome3.enable = lib.mkDefault true;
2021-03-06 18:11:11 +01:00
};
2019-10-24 02:20:38 +02:00
windowManager = {
xmonad.enable = true;
xmonad.enableContribAndExtras = true;
2020-09-03 00:08:52 +02:00
i3.enable = true;
2019-10-24 02:20:38 +02:00
};
# mouse/touchpad
# --------------
libinput = {
enable = true;
2021-07-08 20:43:14 +02:00
touchpad = {
disableWhileTyping = true;
tapping = true;
scrollMethod = "twofinger";
accelSpeed = "2";
2021-07-08 20:43:14 +02:00
};
2019-10-24 02:20:38 +02:00
};
# Wacom configuraton
# ------------------
modules = [ pkgs.xf86_input_wacom ];
};
# Packages
# --------
2019-12-20 05:54:26 +01:00
environment.systemPackages = with pkgs; [
2019-10-24 02:20:38 +02:00
2023-02-17 00:59:29 +01:00
xclip
xtrlock-pam
xorg.xev
xorg.xmodmap
2019-10-24 02:20:38 +02:00
dmenu
arandr
xcalib
flameshot
feh
];
# Xresources config
# -----------------
# spread the Xresource config
# across different files
# just add a file into `/etc/X11/Xresource.d/` and it will be
# evaluated.
2023-02-16 13:52:15 +01:00
# todo this is better:
#include "/etc/X11/Xresources.d/xterm"
#include "/etc/X11/Xresources.d/rxvt-unicode"
#include "/etc/X11/Xresources.d/fonts"
#include "/etc/X11/Xresources.d/xscreensaver"
2019-10-24 02:20:38 +02:00
services.xserver.displayManager.sessionCommands = ''
for file in `ls /etc/X11/Xresource.d/`
do
${pkgs.xorg.xrdb}/bin/xrdb -merge /etc/X11/Xresource.d/$file
done
'';
environment.etc."/X11/Xresource.d/.keep".text = "";
};
}