so many sops
This commit is contained in:
198
modules/desktop-environments/hyprland/home.nix
Executable file
198
modules/desktop-environments/hyprland/home.nix
Executable file
@@ -0,0 +1,198 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
wallpaper = "/home/matt/.config/wallpapers/wall.png";
|
||||
cursorTheme = "macOS";
|
||||
cursorThemePkg = pkgs.apple-cursor;
|
||||
cursorSize = 24;
|
||||
gtkThemeSize = "compact";
|
||||
gtkThemeAccent = "all";
|
||||
gtkThemeVariant = "nord";
|
||||
gtkThemeColor = "dark";
|
||||
gtkTheme = "Colloid-Dark-Compact-Nord";
|
||||
gtkThemePkg = pkgs.colloid-gtk-theme.override {
|
||||
sizeVariants = [ gtkThemeSize ];
|
||||
colorVariants = [ gtkThemeColor ];
|
||||
themeVariants = [ gtkThemeAccent ];
|
||||
tweaks = [ gtkThemeVariant ];
|
||||
};
|
||||
# iconThemeColor = "dark"; # "" "light" "dark"
|
||||
# iconThemeVariant = ""; # "" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey"
|
||||
iconThemeScheme = "nord"; # "" "nord" "dracula" "gruvbox" "everforest" "catppuccin"
|
||||
iconTheme = "Colloid-Nord";
|
||||
iconThemePkg = pkgs.colloid-icon-theme.override {
|
||||
schemeVariants = [ iconThemeScheme ];
|
||||
colorVariants = [ "default" ];
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./config.nix
|
||||
./config/btop
|
||||
./config/hypr
|
||||
./config/kitty
|
||||
./config/mako
|
||||
./config/waybar
|
||||
./config/wofi
|
||||
];
|
||||
|
||||
services = {
|
||||
hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
preload = [ wallpaper ];
|
||||
wallpaper = [
|
||||
"DP-1, ${wallpaper}"
|
||||
"DP-2, ${wallpaper}"
|
||||
];
|
||||
splash = false;
|
||||
};
|
||||
};
|
||||
|
||||
hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
|
||||
};
|
||||
listener = [
|
||||
# {
|
||||
# timeout = 300; # 5min
|
||||
# on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
|
||||
# on-resume = "brightnessctl -r"; # monitor backlight restore.
|
||||
# }
|
||||
{
|
||||
timeout = 900; # 15 min
|
||||
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
|
||||
}
|
||||
{
|
||||
timeout = 930; # 15.5 min
|
||||
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
|
||||
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
|
||||
}
|
||||
{
|
||||
timeout = 3600; # 1hr
|
||||
on-timeout = "systemctl suspend"; # suspend pc
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = [
|
||||
{
|
||||
monitor = "";
|
||||
path = wallpaper; # supports png, jpg, webp (no animations, though)
|
||||
color = "rgba(25, 20, 20, 1.0)";
|
||||
|
||||
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
|
||||
blur_passes = "3"; # 0 disables blurring
|
||||
blur_size = "7";
|
||||
noise = "0.0117";
|
||||
contrast = "0.8916";
|
||||
brightness = "0.8172";
|
||||
vibrancy = "0.1696";
|
||||
vibrancy_darkness = "0.0";
|
||||
}
|
||||
];
|
||||
input-field = [
|
||||
{
|
||||
size = "200, 50";
|
||||
position = "0, -80";
|
||||
monitor = "DP-1";
|
||||
dots_center = true;
|
||||
fade_on_empty = true;
|
||||
font_color = "rgb(202, 211, 245)";
|
||||
inner_color = "rgb(91, 96, 120)";
|
||||
outer_color = "rgb(24, 25, 38)";
|
||||
bothlock_color = -1;
|
||||
outline_thickness = 5;
|
||||
placeholder_text = ''<span foreground="##cad3f5">Password...</span>'';
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
BROWSER = "firefox";
|
||||
EDITOR = "nano";
|
||||
TERMINAL = "kitty";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
QT_QPA_PLATFORMTHEME = "gtk3";
|
||||
QT_SCALE_FACTOR = "1";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
QT_QPA_PLATFORM = "wayland-egl";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
GTK_CSD = "0";
|
||||
# WLR_DRM_DEVICES = "/dev/dri/card0";
|
||||
# WLR_NO_HARDWARE_CURSORS = "1";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
# WLR_RENDERER = "vulkan";
|
||||
XCURSOR_THEME = cursorTheme;
|
||||
XCURSOR_SIZE = cursorSize;
|
||||
HYPRCURSOR_THEME = cursorTheme;
|
||||
HYPRCURSOR_SIZE = cursorSize;
|
||||
GTK_THEME = gtkTheme;
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
GTK_USE_PORTAL = "1";
|
||||
NIXOS_XDG_OPEN_USE_PORTAL = "1";
|
||||
XDG_CACHE_HOME = "\${HOME}/.cache";
|
||||
XDG_CONFIG_HOME = "\${HOME}/.config";
|
||||
#XDG_BIN_HOME = "\${HOME}/.local/bin";
|
||||
XDG_DATA_HOME = "\${HOME}/.local/share";
|
||||
ICON_THEME = iconTheme;
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
package = cursorThemePkg;
|
||||
name = cursorTheme;
|
||||
size = cursorSize;
|
||||
};
|
||||
|
||||
dconf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"org/gnome/desktop/interface".cursor-theme = cursorTheme;
|
||||
"org/gnome/desktop/interface".icon-theme = iconTheme;
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
cursorTheme = {
|
||||
name = cursorTheme; # macOS-[BigSur, Monterey]-[ , White, White-Windows, Windows]
|
||||
package = cursorThemePkg;
|
||||
};
|
||||
|
||||
theme = {
|
||||
name = gtkTheme;
|
||||
package = gtkThemePkg;
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
name = iconTheme;
|
||||
package = iconThemePkg;
|
||||
};
|
||||
|
||||
gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = true;
|
||||
};
|
||||
|
||||
gtk4.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user