79 lines
1.6 KiB
Nix
79 lines
1.6 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
with lib;
|
|
{
|
|
|
|
imports = [ ./xlock.nix ];
|
|
|
|
config = mkIf config.components.gui.enable {
|
|
|
|
# system.custom.fonts.enable = true;
|
|
|
|
services.xserver = {
|
|
|
|
enable = true;
|
|
|
|
displayManager = {
|
|
defaultSession = lib.mkDefault "none+i3";
|
|
autoLogin.enable = lib.mkDefault true;
|
|
autoLogin.user = config.users.users.mainUser.name;
|
|
lightdm.enable = lib.mkDefault true;
|
|
};
|
|
|
|
desktopManager = {
|
|
xterm.enable = false;
|
|
};
|
|
windowManager = {
|
|
xmonad.enable = true;
|
|
xmonad.enableContribAndExtras = true;
|
|
i3.enable = true;
|
|
};
|
|
|
|
# mouse/touchpad
|
|
# --------------
|
|
libinput = {
|
|
enable = true;
|
|
touchpad = {
|
|
disableWhileTyping = true;
|
|
tapping = true;
|
|
scrollMethod = "twofinger";
|
|
accelSpeed = "1.3";
|
|
naturalScrolling = true;
|
|
horizontalScrolling = true;
|
|
};
|
|
};
|
|
|
|
};
|
|
|
|
# Packages
|
|
# --------
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
xclip
|
|
xtrlock-pam
|
|
xorg.xev
|
|
|
|
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.
|
|
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 = "";
|
|
|
|
};
|
|
}
|
|
|