cleanup
This commit is contained in:
@@ -1,74 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.mjallen.desktop.hyprland;
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
box64
|
||||
brightnessctl
|
||||
ddcutil
|
||||
dunst
|
||||
egl-wayland
|
||||
file-roller
|
||||
glib
|
||||
gnome-calculator
|
||||
gnome-calendar
|
||||
gnome-disk-utility
|
||||
gnome-firmware
|
||||
gnome-firmware-updater
|
||||
gnome-font-viewer
|
||||
gnome-logs
|
||||
gnome-photos
|
||||
gnome-tweaks
|
||||
gnome-weather
|
||||
gsettings-desktop-schemas
|
||||
hyprcursor
|
||||
hyprland
|
||||
hyprpaper
|
||||
hyprshot
|
||||
hyprsysteminfo
|
||||
kdePackages.qtmultimedia
|
||||
libnotify
|
||||
libz
|
||||
mako
|
||||
meson
|
||||
nautilus
|
||||
networkmanagerapplet
|
||||
nm-tray
|
||||
nomacs
|
||||
nwg-look
|
||||
overskride
|
||||
pamixer
|
||||
pavucontrol
|
||||
playerctl
|
||||
polkit
|
||||
polkit_gnome
|
||||
qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
rofi-wayland
|
||||
waybar
|
||||
wayland-protocols
|
||||
wayland-utils
|
||||
waypaper
|
||||
wev
|
||||
wl-clipboard
|
||||
wlogout
|
||||
wlroots
|
||||
xdg-desktop-portal-hyprland
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-wlr
|
||||
xorg.xhost
|
||||
xsettingsd
|
||||
xwayland
|
||||
|
||||
pkgs.mjallen.pipewire-python
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.${namespace}.desktop.hyprland;
|
||||
in
|
||||
{
|
||||
imports = [ ../../options.nix ];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.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 = cfg.hyprIdle.lockScreenTimer;
|
||||
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
|
||||
}
|
||||
{
|
||||
timeout = cfg.hyprIdle.screenOffTimer;
|
||||
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 = cfg.hyprIdle.suspendTimer;
|
||||
on-timeout = "systemctl suspend"; # suspend pc
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.${namespace}.desktop.hyprland;
|
||||
in
|
||||
{
|
||||
imports = [ ../../options.nix ];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = [
|
||||
{
|
||||
monitor = "";
|
||||
path = cfg.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 = cfg.primaryDisplay;
|
||||
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;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.${namespace}.desktop.hyprland;
|
||||
in
|
||||
{
|
||||
imports = [ ../../options.nix ];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
preload = [ "/run/wallpaper.jpg" ];
|
||||
wallpaper = ",/run/wallpaper.jpg";
|
||||
splash = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.mjallen.desktop.hyprland;
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
home.sessionVariables = {
|
||||
BROWSER = "${cfg.defaultApps.browser.pname}";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
EDITOR = "${cfg.defaultApps.editor.pname}";
|
||||
VISUAL = "${cfg.defaultApps.visual.pname}";
|
||||
ICON_THEME = cfg.iconThemeName;
|
||||
GTK_CSD = "0";
|
||||
GTK_THEME = cfg.gtkThemeName;
|
||||
GTK_USE_PORTAL = "1";
|
||||
HYPRCURSOR_THEME = config.home.pointerCursor.name;
|
||||
HYPRCURSOR_SIZE = config.home.pointerCursor.size;
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
NIXOS_XDG_OPEN_USE_PORTAL = "1";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
QT_QPA_PLATFORM = "wayland-egl";
|
||||
QT_QPA_PLATFORMTHEME = "gtk3";
|
||||
QT_SCALE_FACTOR = "1";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
TERMINAL = "${cfg.defaultApps.terminal.pname}";
|
||||
XCURSOR_THEME = config.home.pointerCursor.name;
|
||||
XCURSOR_SIZE = config.home.pointerCursor.size;
|
||||
XDG_CACHE_HOME = "\${HOME}/.cache";
|
||||
XDG_CONFIG_HOME = "\${HOME}/.config";
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
XDG_DATA_HOME = "\${HOME}/.local/share";
|
||||
XDG_SESSION_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
};
|
||||
};
|
||||
}
|
||||
113
modules/home/desktop/hyprland/default.nix → modules/home/programs/hyprland/default.nix
Executable file → Normal file
113
modules/home/desktop/hyprland/default.nix → modules/home/programs/hyprland/default.nix
Executable file → Normal file
@@ -6,27 +6,121 @@
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.mjallen.desktop.hyprland;
|
||||
cfg = config.mjallen.programs.hyprland;
|
||||
drawer = "nwg-drawer -fm nautilus -term kitty -mb 10 -mt 10 -ml 10 -mr 10 -pbuseicontheme -i ${cfg.iconThemeName}";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./options.nix
|
||||
./packages.nix
|
||||
./theme.nix
|
||||
./variables.nix
|
||||
];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Home packages
|
||||
home.packages = with pkgs; [
|
||||
box64
|
||||
brightnessctl
|
||||
ddcutil
|
||||
dunst
|
||||
egl-wayland
|
||||
file-roller
|
||||
glib
|
||||
gnome-calculator
|
||||
gnome-calendar
|
||||
gnome-disk-utility
|
||||
gnome-firmware
|
||||
gnome-firmware-updater
|
||||
gnome-font-viewer
|
||||
gnome-logs
|
||||
gnome-photos
|
||||
gnome-tweaks
|
||||
gnome-weather
|
||||
gsettings-desktop-schemas
|
||||
hyprcursor
|
||||
hyprland
|
||||
hyprpaper
|
||||
hyprshot
|
||||
hyprsysteminfo
|
||||
kdePackages.qtmultimedia
|
||||
libnotify
|
||||
libz
|
||||
mako
|
||||
meson
|
||||
nautilus
|
||||
networkmanagerapplet
|
||||
nm-tray
|
||||
nomacs
|
||||
nwg-look
|
||||
overskride
|
||||
pamixer
|
||||
pavucontrol
|
||||
playerctl
|
||||
polkit
|
||||
polkit_gnome
|
||||
qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
rofi-wayland
|
||||
waybar
|
||||
wayland-protocols
|
||||
wayland-utils
|
||||
waypaper
|
||||
wev
|
||||
wl-clipboard
|
||||
wlogout
|
||||
wlroots
|
||||
xdg-desktop-portal-hyprland
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-wlr
|
||||
xorg.xhost
|
||||
xsettingsd
|
||||
xwayland
|
||||
|
||||
pkgs.mjallen.pipewire-python
|
||||
];
|
||||
|
||||
# Session variables
|
||||
home.sessionVariables = {
|
||||
BROWSER = "${cfg.defaultApps.browser.pname}";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
EDITOR = "${cfg.defaultApps.editor.pname}";
|
||||
VISUAL = "${cfg.defaultApps.visual.pname}";
|
||||
ICON_THEME = cfg.iconThemeName;
|
||||
GTK_CSD = "0";
|
||||
GTK_THEME = cfg.gtkThemeName;
|
||||
GTK_USE_PORTAL = "1";
|
||||
HYPRCURSOR_THEME = config.home.pointerCursor.name;
|
||||
HYPRCURSOR_SIZE = config.home.pointerCursor.size;
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
NIXOS_XDG_OPEN_USE_PORTAL = "1";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
QT_QPA_PLATFORM = "wayland-egl";
|
||||
QT_QPA_PLATFORMTHEME = "gtk3";
|
||||
QT_SCALE_FACTOR = "1";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
TERMINAL = "${cfg.defaultApps.terminal.pname}";
|
||||
XCURSOR_THEME = config.home.pointerCursor.name;
|
||||
XCURSOR_SIZE = config.home.pointerCursor.size;
|
||||
XDG_CACHE_HOME = "\${HOME}/.cache";
|
||||
XDG_CONFIG_HOME = "\${HOME}/.config";
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
XDG_DATA_HOME = "\${HOME}/.local/share";
|
||||
XDG_SESSION_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
};
|
||||
|
||||
# Services
|
||||
services = {
|
||||
hyprpolkitagent.enable = true;
|
||||
};
|
||||
|
||||
# Programs
|
||||
programs = {
|
||||
vscode.profiles.default.userSettings."window"."titleBarStyle" = "custom";
|
||||
};
|
||||
|
||||
# Wayland configuration
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
@@ -159,6 +253,7 @@ in
|
||||
|
||||
misc = {
|
||||
vrr = 1;
|
||||
force_default_wallpaper = 0;
|
||||
};
|
||||
|
||||
general = {
|
||||
@@ -180,10 +275,6 @@ in
|
||||
new_optimizations = true;
|
||||
xray = false;
|
||||
};
|
||||
# drop_shadow = "yes";
|
||||
# shadow_range = 4;
|
||||
# shadow_render_power = "3";
|
||||
# "col.shadow" = "rgba(1a1a1aee)";
|
||||
};
|
||||
|
||||
animations = {
|
||||
@@ -209,10 +300,6 @@ in
|
||||
preserve_split = "yes";
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = 0;
|
||||
};
|
||||
|
||||
workspace = cfg.workspace;
|
||||
|
||||
windowrule = [
|
||||
@@ -263,7 +350,7 @@ in
|
||||
"float, class:(.*codium.*),title:(Save As)"
|
||||
"float, class:(xdg-desktop-portal-gtk),title:(Open Workspace from File)"
|
||||
|
||||
# Game Tearing??? https://wiki.hyprland.org/Configuring/Tearing/
|
||||
# Game Tearing??? https://wiki.hypr.land/Configuring/Tearing/
|
||||
"immediate, class:(.*gamescope)"
|
||||
|
||||
# vmware
|
||||
@@ -284,8 +371,6 @@ in
|
||||
"renderunfocused, tag:horizonrdp"
|
||||
"idleinhibit, tag:horizonrdp"
|
||||
"float, tag:horizonrdp"
|
||||
# "size 2160 7680, tag:horizonrdp"
|
||||
# "move onscreen 0 0, tag:horizonrdp"
|
||||
# float the vmware window cause its annoying to use in fullscreen
|
||||
"float, class:(.*[Hh]orizon-client),title:([Oo]mnissa [Hh]orizon [Cc]lient)"
|
||||
|
||||
@@ -1,28 +1,32 @@
|
||||
{ lib, pkgs, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.mjallen.desktop.hyprland = {
|
||||
enable = mkEnableOption "enable hyprland desktop";
|
||||
options.mjallen.programs.hyprland = {
|
||||
enable = mkEnableOption "enable hyprland";
|
||||
|
||||
primaryDisplay = mkOption {
|
||||
type = types.str;
|
||||
default = "DP-1";
|
||||
description = "Primary display identifier";
|
||||
};
|
||||
|
||||
display1 = {
|
||||
input = mkOption {
|
||||
type = types.str;
|
||||
default = "DP-1";
|
||||
description = "First display identifier";
|
||||
};
|
||||
|
||||
resolution = mkOption {
|
||||
type = types.str;
|
||||
default = "3840x2160";
|
||||
description = "First display resolution";
|
||||
};
|
||||
|
||||
refreshRate = mkOption {
|
||||
type = types.str;
|
||||
default = "240.00000";
|
||||
description = "First display refresh rate";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -30,63 +34,68 @@ with lib;
|
||||
input = mkOption {
|
||||
type = types.str;
|
||||
default = "DP-1";
|
||||
description = "Second display identifier";
|
||||
};
|
||||
|
||||
resolution = mkOption {
|
||||
type = types.str;
|
||||
default = "3840x2160";
|
||||
description = "Second display resolution";
|
||||
};
|
||||
|
||||
refreshRate = mkOption {
|
||||
type = types.str;
|
||||
default = "240.00000";
|
||||
description = "Second display refresh rate";
|
||||
};
|
||||
};
|
||||
|
||||
wallpaper = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
description = "list of hyprland wallpaper configs";
|
||||
description = "List of hyprland wallpaper configs";
|
||||
};
|
||||
|
||||
monitor = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
description = "list of hyprland monitor configs";
|
||||
description = "List of hyprland monitor configs";
|
||||
};
|
||||
|
||||
monitorv2 = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
description = "list of hyprland monitorv2 configs";
|
||||
description = "List of hyprland monitorv2 configs";
|
||||
};
|
||||
|
||||
workspace = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
description = "list of hyprland workspace definitions";
|
||||
description = "List of hyprland workspace definitions";
|
||||
};
|
||||
|
||||
windowRule = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
description = "list of hyprland window rules";
|
||||
description = "List of hyprland window rules";
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = with types; str;
|
||||
default = '''';
|
||||
description = "any extra options";
|
||||
description = "Any extra configuration options";
|
||||
};
|
||||
|
||||
iconThemeName = mkOption {
|
||||
type = types.str;
|
||||
default = "Colloid-Dark";
|
||||
description = "Icon theme name";
|
||||
};
|
||||
|
||||
gtkThemeName = mkOption {
|
||||
type = types.str;
|
||||
default = "Colloid-Dark";
|
||||
description = "GTK theme name";
|
||||
};
|
||||
|
||||
defaultApps = mkOption {
|
||||
@@ -95,52 +104,63 @@ with lib;
|
||||
browser = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.firefox;
|
||||
description = "Default browser";
|
||||
};
|
||||
editor = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.micro;
|
||||
description = "Default text editor";
|
||||
};
|
||||
fileExplorer = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.nemo;
|
||||
description = "Default file explorer";
|
||||
};
|
||||
visual = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.vscodium;
|
||||
description = "Default visual editor";
|
||||
};
|
||||
terminal = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.kitty;
|
||||
description = "Default terminal";
|
||||
};
|
||||
office = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.onlyoffice-bin_latest;
|
||||
description = "Default office suite";
|
||||
};
|
||||
video = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.vlc;
|
||||
description = "Default video player";
|
||||
};
|
||||
imageViewer = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.nomacs;
|
||||
description = "Default image viewer";
|
||||
};
|
||||
};
|
||||
};
|
||||
description = "Default applications used across the system.";
|
||||
description = "Default applications used across the system";
|
||||
};
|
||||
|
||||
hyprIdle = {
|
||||
lockScreenTimer = mkOption {
|
||||
type = with types; int;
|
||||
default = 300;
|
||||
description = "Time in seconds before locking the screen";
|
||||
};
|
||||
screenOffTimer = mkOption {
|
||||
type = with types; int;
|
||||
default = 900;
|
||||
description = "Time in seconds before turning off the screen";
|
||||
};
|
||||
suspendTimer = mkOption {
|
||||
type = with types; int;
|
||||
default = 1800;
|
||||
description = "Time in seconds before suspending";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -6,7 +6,7 @@
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.mjallen.desktop.hyprland;
|
||||
cfg = config.mjallen.programs.hyprland;
|
||||
|
||||
themeSize = "compact"; # [ "standard" "compact" ]
|
||||
themeAccent = "all"; # [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" "all" ]
|
||||
@@ -21,10 +21,6 @@ let
|
||||
cursorSize = 24;
|
||||
|
||||
# GTK
|
||||
# gtkThemeSize = themeSize;
|
||||
# gtkThemeAccent = themeAccent;
|
||||
# gtkThemeVariant = themeVariant;
|
||||
# gtkThemeColor = themeColor;
|
||||
gtkTheme = "Colloid-Dark-Compact-Nord";
|
||||
gtkThemePkg = pkgs.colloid-gtk-theme.override {
|
||||
sizeVariants = [ themeSize ];
|
||||
@@ -34,7 +30,6 @@ let
|
||||
};
|
||||
|
||||
# Icons
|
||||
# iconThemeScheme = iconScheme;
|
||||
iconTheme = "Colloid-Nord-Dark";
|
||||
iconThemePkg = pkgs.colloid-icon-theme.override {
|
||||
schemeVariants = [ iconScheme ];
|
||||
Reference in New Issue
Block a user