[Hyprland] Migrates to new lua-based config
This commit is contained in:
123
home-manager/features/hypr/hyprland.nix
Normal file
123
home-manager/features/hypr/hyprland.nix
Normal file
@@ -0,0 +1,123 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../swaylock.nix
|
||||
./hypridle.nix
|
||||
];
|
||||
|
||||
xdg.configFile = {
|
||||
"hypr/hyprsplit" = {
|
||||
source = "${inputs.hyprsplit}";
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
"hypr/base.lua" = {
|
||||
source = ./config/hyprland.lua;
|
||||
};
|
||||
"hypr/config" = {
|
||||
source = ./config;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
swayosd # volume pop-up
|
||||
swaynotificationcenter # notifications
|
||||
hyprpolkitagent # Privilege managent
|
||||
hyprshot # Screenshot utility
|
||||
|
||||
# For clipboard management. See below.
|
||||
wl-clipboard
|
||||
xclip
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
|
||||
# TODO: Switch to the newer LUA config?
|
||||
configType = "lua";
|
||||
|
||||
plugins = [
|
||||
# https://github.com/outfoxxed/hy3
|
||||
pkgs.hyprlandPlugins.hy3
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
require("config.hyprland")
|
||||
'';
|
||||
|
||||
# Disable systemd because it conflicts with UWSM
|
||||
systemd.enable = false;
|
||||
|
||||
};
|
||||
|
||||
programs.hyprlock = {
|
||||
enable = false;
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
hide_cursor = true;
|
||||
};
|
||||
|
||||
background = {
|
||||
monitor = "";
|
||||
color = "rgb(000000)";
|
||||
};
|
||||
|
||||
# Time
|
||||
label = {
|
||||
monitor = "";
|
||||
text = ''
|
||||
cmd[update:1000] echo "$(date '+%F %T')"
|
||||
'';
|
||||
font_size = 96;
|
||||
font_family = "NotoSans Nerd Font";
|
||||
color = "rgb(990000)";
|
||||
position = "0, 0";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
|
||||
input-field = {
|
||||
monitor = "";
|
||||
size = "300, 40";
|
||||
fade_on_empty = true;
|
||||
outline_thickness = 2;
|
||||
outer_color = "rgb(cc2222) rgb(661111)";
|
||||
inner_color = "rgb(221111)";
|
||||
|
||||
font_color = "rgb(cc2222)";
|
||||
dots_size = 0.2;
|
||||
dots_spacing = 0.1;
|
||||
placeholder_text = "";
|
||||
|
||||
fail_color = "rgb(cc3333)";
|
||||
capslock_color = "rgb(cccc33)";
|
||||
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
position = "0, -300px";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# UWSM sessions should not use Hyprland's variables but instead use UWSM's variable management.
|
||||
# See https://wiki.hyprland.org/Configuring/Environment-variables/
|
||||
home.file.".config/uwsm/env".text = ''
|
||||
export XCURSOR_SIZE="32"
|
||||
export HYPRCURSOR_SIZE="32"
|
||||
export HYPRCURSOR_THEME="phinger"
|
||||
|
||||
# Nvidia config
|
||||
export LIBVA_DRIVER_NAME="nvidia"
|
||||
export __GLX_VENDOR_LIBRARY_NAME="nvidia"
|
||||
|
||||
# For window theming
|
||||
export QT_QPA_PLATFORMTHEME="qt6ct # for Qt apps"
|
||||
export GTK_THEME="Adwaita-dark"
|
||||
|
||||
# Tell electron apps they should use OZone for Wayland
|
||||
export ELECTRON_OZONE_PLATFORM_HINT="auto"
|
||||
'';
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user