desktop building?

This commit is contained in:
mjallen18
2025-07-20 18:35:14 -05:00
parent 91be65bc39
commit 608a6ce9b8
51 changed files with 535 additions and 299 deletions

View File

@@ -2,7 +2,7 @@
with lib;
let
cfg = config.mjallen.desktop.hyprland;
drawer = "nwg-drawer -fm nautilus -term kitty -mb 10 -mt 10 -ml 10 -mr 10 -pbuseicontheme -i ${config.home-manager.users.matt.gtk.iconTheme.name}";
drawer = "nwg-drawer -fm nautilus -term kitty -mb 10 -mt 10 -ml 10 -mr 10 -pbuseicontheme -i ${cfg.iconThemeName}";
in
{
imports = [
@@ -71,8 +71,8 @@ in
"$mod SHIFT, F, fullscreen, 0"
"$mod SHIFT, E, exec, smile"
"$mod, mouse:276, movecurrentworkspacetomonitor, ${cfg.displayLeft.input}"
"$mod, mouse:275, movecurrentworkspacetomonitor, ${cfg.displayRight.input}"
"$mod, mouse:276, movecurrentworkspacetomonitor, ${cfg.display1.input}"
"$mod, mouse:275, movecurrentworkspacetomonitor, ${cfg.display2.input}"
# alt-tab between workspaces on active monitor
"$mod, Tab, workspace, m+1"

View File

@@ -5,13 +5,48 @@ with lib;
enable = mkEnableOption "enable hyprland desktop";
primaryDisplay = mkOption {
type = types.string;
type = types.str;
default = "DP-1";
};
display1 = {
input = mkOption {
type = types.str;
default = "DP-1";
};
resolution = mkOption {
type = types.str;
default = "3840x2160";
};
refreshRate = mkOptions {
type = types.str;
default = "240.00000";
};
};
display2 = {
input = mkOption {
type = types.str;
default = "DP-1";
};
resolution = mkOption {
type = types.str;
default = "3840x2160";
};
refreshRate = mkOptions {
type = types.str;
default = "240.00000";
};
};
wallpaper = mkOption {
type = types.string;
default = "/run/wallpaper.jpeg";
type = with types; listOf str;
default = [];
description = "list of hyprland wallpaper configs";
};
monitor = mkOption {
@@ -44,6 +79,16 @@ with lib;
description = "any extra options";
};
iconThemeName = mkOption {
type = types.str;
default = "Colloid-Dark";
};
gtkThemeName = mkOption {
type = types.str;
default = "Colloid-Dark";
};
defaultApps = mkOption {
type = types.submodule {
options = {
@@ -62,15 +107,15 @@ with lib;
hyprIdle = {
lockScreenTimer = mkOption {
type = with types; null || signed integer || floating point number;
type = with types; int;
default = 5;
};
screenOffTimer = mkOption {
type = with types; null || signed integer || floating point number;
type = with types; int;
default = 15;
};
suspendTimer = mkOption {
type = with types; null || signed integer || floating point number;
type = with types; int;
default = 30;
};
};

View File

@@ -22,16 +22,16 @@ in
# on-resume = "brightnessctl -r"; # monitor backlight restore.
# }
{
timeout = cfg.hypridle.lockScreenTimer;
timeout = cfg.hyprIdle.lockScreenTimer;
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
}
{
timeout = cfg.hypridle.screenOffTimer;
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;
timeout = cfg.hyprIdle.suspendTimer;
on-timeout = "systemctl suspend"; # suspend pc
}
];

View File

@@ -16,10 +16,10 @@ let
cursorSize = 24;
# GTK
gtkThemeSize = themeSize;
gtkThemeAccent = themeAccent;
gtkThemeVariant = themeVariant;
gtkThemeColor = themeColor;
# gtkThemeSize = themeSize;
# gtkThemeAccent = themeAccent;
# gtkThemeVariant = themeVariant;
# gtkThemeColor = themeColor;
gtkTheme = "Colloid-Dark-Compact-Nord";
gtkThemePkg = pkgs.colloid-gtk-theme.override {
sizeVariants = [ themeSize ];
@@ -29,7 +29,7 @@ let
};
# Icons
iconThemeScheme = iconScheme;
# iconThemeScheme = iconScheme;
iconTheme = "Colloid-Nord-Dark";
iconThemePkg = pkgs.colloid-icon-theme.override {
schemeVariants = [ iconScheme ];

View File

@@ -10,12 +10,12 @@ in
CLUTTER_BACKEND = "wayland";
EDITOR = "${cfg.defaultApps.editor.pname}";
VISUAL = "${cfg.defaultApps.visual.pname}";
ICON_THEME = settings.iconTheme;
ICON_THEME = cfg.iconThemeName;
GTK_CSD = "0";
GTK_THEME = settings.gtkTheme;
GTK_THEME = cfg.gtkThemeName;
GTK_USE_PORTAL = "1";
HYPRCURSOR_THEME = config.home-manager.users.matt.pointerCursor.name;
HYPRCURSOR_SIZE = config.home-manager.users.matt.pointerCursor.size;
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";
@@ -26,8 +26,8 @@ in
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SDL_VIDEODRIVER = "wayland";
TERMINAL = "${cfg.defaultApps.terminal.pname}";
XCURSOR_THEME = config.home-manager.users.matt.pointerCursor.name;
XCURSOR_SIZE = config.home-manager.users.matt.pointerCursor.size;
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";