dotfiles-nixos/nixos/modules/i3.nix
2023-06-11 18:07:31 +02:00

44 lines
1.3 KiB
Nix

{ config, lib, pkgs, ... }:
{
environment.pathsToLink = [ "/libexec" ]; # links /libexec from derivations to /run/current-system/sw
# Define the i3 window manager configuration
services.xserver = {
enable = true;
desktopManager = {
xterm.enable = false;
};
displayManager.defaultSession = "none+i3";
displayManager.lightdm.enable = true;
displayManager.autoLogin.enable = true;
displayManager.autoLogin.user = "mans";
displayManager.setupCommands = ''
${pkgs.xorg.xrandr}/bin/xrandr --output DP-4 --rate 144.00 --size 1920x1080 --right-of HDMI-0 --primary --output HDMI-0 --auto
'';
windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [
dmenu #application launcher most people use
i3status # gives you the default i3 status bar
i3lock #default i3 screen locker
i3blocks #if you are planning on using i3blocks over i3status
];
};
layout = "us";
xkbVariant = "";
};
hardware.opengl.enable = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
# nvidia-drm.modeset=1 is required for some wayland compositors, e.g. sway
hardware.nvidia.modesetting.enable = true;
}