Get Hyprland and stuff all set up on desktop

This commit is contained in:
Elnu 2025-06-19 12:29:12 -07:00
parent 96739c5979
commit 44c5a27387
15 changed files with 668 additions and 13 deletions

View file

@ -15,17 +15,11 @@ in
extraPackages = lib.mkOverride 0 [];
};
displayManager = {
lightdm = {
enable = true;
greeters.gtk = {
enable = true;
theme = theme.gtkTheme pkgs;
};
background = theme.wallpaper;
};
sddm.enable = true;
};
};
displayManager = {
enable = true;
defaultSession = "none+i3";
};
udev.packages = [ pkgs.yubikey-personalization ];
@ -34,16 +28,18 @@ in
gvfs.enable = true; # For Trash
};
programs.hyprland.enable = true;
programs.sway.enable = true;
xdg.portal.enable = true;
environment.systemPackages = with pkgs; [ yubioath-flutter ];
# Needed mesa for whatever reason to get Discord to work on Wayland on my desktop
environment.systemPackages = with pkgs; [ yubioath-flutter mesa ];
environment.sessionVariables = {
# GTK Theme won't display with GTK4 (e.g. nautilus) otherwise
# Doesn't work in some scenarios, such as open containing folder in Firefox, when declared in home.sessionVariables
GTK_THEME = (theme.gtkTheme pkgs).name;
# something something required for Electron apps on Wayland
NIXOS_OZONE_WL = "1";
};
# Enable OpenTabletDriver, GUI configurator is otd-gui

View file

@ -4,7 +4,7 @@
imports = [ (import ./hardware-configuration.nix) ];
services.xserver = {
videoDrivers = [ "nvidia" ];
videoDrivers = [ "nvidia-dkms" ];
# nvidiaXineramaInfoOrder sets primary display
# DFP-0 is default and would set left monitor, DVI-D-0, to be primary
screenSection = ''

View file

@ -15,6 +15,7 @@
hardware.enableRedistributableFirmware = true;
hardware.bluetooth.enable = true;
hardware.nvidia.open = true;
hardware.graphics.extraPackages = with pkgs; [ nvidia-vaapi-driver ];
fileSystems = {
"/" = {
@ -22,7 +23,7 @@
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-label/boot";
device = "/dev/sda5";
fsType = "vfat";
};
# Prevent SCARLETT from auto-mounting

View file

@ -4,5 +4,6 @@
imports = [
(import ./apps.nix)
(import ./i3)
(import ./hypr)
];
}

View file

@ -0,0 +1,7 @@
{ ... }:
{
home.file = {
".config/hypr/monitors.conf".source = ./monitors.conf;
};
}

View file

@ -0,0 +1,39 @@
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=HDMI-A-1, 1920x1080@100.05, 1080x420, 1
monitor=DVI-D-1, 1920x1080@60.00, 0x0, 1, transform, 1
monitor=DP-1, 1920x1080@60.04Hz, 1080x1500, 1
workspace = name:1, monitor:HDMI-A-1
workspace = name:2, monitor:DVI-D-1
workspace = name:3, monitor:DP-1
# See https://github.com/HyDE-Project/HyDE/blob/master/Configs/.config/hypr/nvidia.conf
# █▄░█ █░█ █ █▀▄ █ ▄▀█
# █░▀█ ▀▄▀ █ █▄▀ █ █▀█
# Hyprland Nvidia Configuration
# See https://wiki.hyprland.org/Nvidia/
env = LIBVA_DRIVER_NAME,nvidia
env = __GLX_VENDOR_LIBRARY_NAME,nvidia # Disable this if you have issues with screensharing
# If you want to try hardware cursors,
# you can enable them by setting `cursor:no_hardware_cursors = false` ,
# but it will require also enabling `cursor:allow_dumb_copy`
# which may cause small to major hitches whenever the cursor shape changes.
# If this is a problem on your system, keep hardware cursors disabled.
cursor:no_hardware_cursors = true # Set to true to avoid hitches
# cursor:allow_dumb_copy = true
# https://wiki.hyprland.org/Nvidia/#va-api-hardware-video-acceleration
# Hardware video acceleration on Nvidia and Wayland is
# possible with the nvidia-vaapi-driver.
# This may solve specific issues in Electron apps.
env = NVD_BACKEND,direct # Requires 'libva-nvidia-driver' package
# https://wiki.hyprland.org/Nvidia/#regarding-environment-variables
# If you encounter crashes in Firefox, remove this line
env = GBM_BACKEND,nvidia-drm
# If you have a multi-GPU setup and you are facing lag in external monitor.
# See https://wiki.hyprland.org/Configuring/Multi-GPU/

View file

@ -10,6 +10,7 @@ in
#../modules/emacs
../modules/fcitx5
../modules/firefox
../modules/hypr
../modules/i3
../modules/neovim
../modules/picom
@ -19,7 +20,6 @@ in
../modules/startpage
../modules/terminal
../modules/todo-txt
#../modules/fantasia-archive
];

View file

@ -4,6 +4,7 @@
imports = [
(import ./apps.nix)
(import ./i3)
(import ./hypr)
(import ../thinkpads/i3.nix)
(import ../thinkpads/polybar.nix)
];

View file

@ -0,0 +1,7 @@
{ ... }:
{
home.file = {
".config/hypr/monitors.conf".source = ./monitors.conf;
};
}

View file

@ -0,0 +1,4 @@
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=eDP-1, 1920x1080@144, 1920x0, 1
monitor=HDMI-A-1, 1920x1080@74.97, 0x0, 1
monitor=DP-1, 1920x1080@60.04, 0x1080, 1