2023-12-04 00:40:27 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
hyprland,
|
|
|
|
lib,
|
2024-06-27 00:56:27 -04:00
|
|
|
pkgs,
|
2023-12-04 00:40:27 -05:00
|
|
|
...
|
2024-01-22 11:09:37 -05:00
|
|
|
}: let
|
2024-05-22 10:52:15 -04:00
|
|
|
inherit (lib) concatStringsSep optionals;
|
2024-03-18 11:15:31 -04:00
|
|
|
|
2024-06-27 00:56:27 -04:00
|
|
|
cfg = config.roles.desktop;
|
2024-06-24 12:30:49 -04:00
|
|
|
|
2024-06-27 00:56:27 -04:00
|
|
|
hyprCfg =
|
2024-06-15 01:40:26 -04:00
|
|
|
config
|
|
|
|
.home-manager
|
|
|
|
.users
|
2024-06-27 00:56:27 -04:00
|
|
|
.${cfg.user}
|
2024-06-15 01:40:26 -04:00
|
|
|
.wayland
|
|
|
|
.windowManager
|
|
|
|
.hyprland;
|
2023-12-04 00:40:27 -05:00
|
|
|
in {
|
2023-12-04 01:13:24 -05:00
|
|
|
# SYSTEM CONFIG
|
2023-12-04 10:05:25 -05:00
|
|
|
imports = [
|
2024-06-27 00:56:27 -04:00
|
|
|
./dconf.nix
|
2023-12-06 15:04:52 -05:00
|
|
|
|
2024-02-05 06:25:43 -05:00
|
|
|
./packages.nix
|
|
|
|
./security.nix
|
|
|
|
];
|
2023-12-04 01:13:24 -05:00
|
|
|
|
|
|
|
services = {
|
|
|
|
dbus.enable = true;
|
|
|
|
gvfs.enable = true;
|
2024-05-01 10:21:28 -04:00
|
|
|
libinput.enable = true;
|
2024-06-27 00:56:27 -04:00
|
|
|
xserver.wacom.enable = cfg.isTouchscreen;
|
2023-12-04 01:13:24 -05:00
|
|
|
};
|
|
|
|
|
2024-06-15 01:40:26 -04:00
|
|
|
programs.hyprland = {
|
2023-12-04 01:13:24 -05:00
|
|
|
enable = true;
|
2024-06-27 00:56:27 -04:00
|
|
|
package = hyprCfg.finalPackage;
|
2024-06-15 01:40:26 -04:00
|
|
|
portalPackage =
|
|
|
|
hyprland
|
|
|
|
.packages
|
|
|
|
.${pkgs.system}
|
|
|
|
.xdg-desktop-portal-hyprland;
|
2023-12-04 01:13:24 -05:00
|
|
|
};
|
|
|
|
|
2024-05-01 10:21:28 -04:00
|
|
|
xdg.portal = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
extraPortals = with pkgs; [
|
|
|
|
xdg-desktop-portal-kde
|
|
|
|
];
|
|
|
|
|
|
|
|
config.hyprland = {
|
|
|
|
default = [
|
|
|
|
"hyprland"
|
|
|
|
"gtk"
|
|
|
|
];
|
2024-06-15 01:40:26 -04:00
|
|
|
|
|
|
|
"org.freedesktop.impl.portal.FileChooser" = [
|
|
|
|
"kde"
|
|
|
|
];
|
2024-05-01 10:21:28 -04:00
|
|
|
};
|
|
|
|
};
|
2024-03-18 11:15:31 -04:00
|
|
|
|
2023-12-04 01:13:24 -05:00
|
|
|
# HOME-MANAGER CONFIG
|
2024-06-27 00:56:27 -04:00
|
|
|
home-manager.users.${cfg.user} = {
|
2023-12-04 00:40:27 -05:00
|
|
|
imports = [
|
2024-06-27 00:56:27 -04:00
|
|
|
./home/dev.nix
|
2024-06-24 11:46:08 -04:00
|
|
|
|
|
|
|
# Plugins
|
2024-06-27 00:56:27 -04:00
|
|
|
./home/hyprgrass.nix
|
|
|
|
./home/hyprexpo.nix
|
|
|
|
# ./home/Hyprspace.nix
|
2024-06-24 11:46:08 -04:00
|
|
|
|
2024-06-27 00:56:27 -04:00
|
|
|
./home/inputs.nix
|
|
|
|
./home/style.nix
|
2023-12-04 00:40:27 -05:00
|
|
|
];
|
|
|
|
|
|
|
|
wayland.windowManager.hyprland = {
|
|
|
|
enable = true;
|
2024-06-15 01:40:26 -04:00
|
|
|
package =
|
|
|
|
hyprland
|
|
|
|
.packages
|
|
|
|
.${pkgs.system}
|
|
|
|
.default;
|
2024-03-18 10:38:50 -04:00
|
|
|
|
|
|
|
systemd.variables = ["-all"];
|
2023-12-04 00:40:27 -05:00
|
|
|
|
|
|
|
settings = {
|
2024-06-15 01:40:26 -04:00
|
|
|
envd = let
|
|
|
|
mkGSchemas = pkg: "${pkg}/share/gsettings-schemas/${pkg.name}";
|
2023-12-09 17:14:12 -05:00
|
|
|
in
|
|
|
|
[
|
2024-06-15 01:40:26 -04:00
|
|
|
"GTK_USE_PORTAL, 1"
|
|
|
|
"NIXOS_OZONE_WL, 1"
|
|
|
|
"ELECTRON_OZONE_PLATFORM_HINT, auto"
|
|
|
|
|
2024-02-05 09:56:42 -05:00
|
|
|
"XDG_DATA_DIRS, ${concatStringsSep ":" [
|
2024-06-15 01:40:26 -04:00
|
|
|
(mkGSchemas pkgs.gsettings-desktop-schemas)
|
|
|
|
(mkGSchemas pkgs.gtk3)
|
2023-12-04 00:40:27 -05:00
|
|
|
"$XDG_DATA_DIRS"
|
|
|
|
]}"
|
|
|
|
]
|
2024-03-03 17:34:21 -05:00
|
|
|
++ (optionals config.nvidia.enable [
|
2023-12-04 00:40:27 -05:00
|
|
|
"LIBVA_DRIVER_NAME, nvidia"
|
2024-06-15 01:40:26 -04:00
|
|
|
"NVD_BACKEND, direct"
|
2023-12-04 00:40:27 -05:00
|
|
|
"XDG_SESSION_TYPE, wayland"
|
|
|
|
"GBM_BACKEND, nvidia-drm"
|
|
|
|
"__GLX_VENDOR_LIBRARY_NAME, nvidia"
|
|
|
|
]);
|
|
|
|
|
|
|
|
xwayland.force_zero_scaling = true;
|
|
|
|
monitor = [
|
2023-12-27 11:39:38 -05:00
|
|
|
(concatStringsSep "," [
|
2023-12-04 00:40:27 -05:00
|
|
|
"desc:Acer Technologies Acer K212HQL T3EAA0014201"
|
|
|
|
"1920x1080@60"
|
2024-05-26 12:32:31 -04:00
|
|
|
"840x450, 1, transform, 3"
|
2023-12-04 00:40:27 -05:00
|
|
|
])
|
2023-12-27 11:39:38 -05:00
|
|
|
(concatStringsSep "," [
|
2023-12-04 00:40:27 -05:00
|
|
|
"desc:BOE 0x0964"
|
|
|
|
"1920x1200@60"
|
|
|
|
"0x2920, 1"
|
|
|
|
])
|
2023-12-27 11:39:38 -05:00
|
|
|
(concatStringsSep "," [
|
2023-12-04 00:40:27 -05:00
|
|
|
"desc:Samsung Electric Company C27JG5x HTOM100586"
|
|
|
|
"2560x1440@60"
|
|
|
|
"1920x120, 1"
|
|
|
|
])
|
2023-12-27 11:39:38 -05:00
|
|
|
(concatStringsSep "," [
|
2023-12-04 00:40:27 -05:00
|
|
|
"desc:GIGA-BYTE TECHNOLOGY CO. LTD. G27QC 0x00000B1D"
|
|
|
|
"2560x1440@165"
|
|
|
|
"1920x1560, 1"
|
|
|
|
])
|
|
|
|
];
|
|
|
|
|
|
|
|
"$mainMod" = "SUPER";
|
|
|
|
|
|
|
|
bind = [
|
|
|
|
# Defaults
|
2024-06-15 01:40:26 -04:00
|
|
|
"$mainMod, F, fullscreen"
|
|
|
|
"$mainMod, C, killactive"
|
|
|
|
"$mainMod SHIFT, SPACE, togglefloating"
|
|
|
|
"$mainMod, J, layoutmsg, togglesplit"
|
2023-12-04 00:40:27 -05:00
|
|
|
|
|
|
|
## Move focus with arrow keys
|
2024-06-15 01:40:26 -04:00
|
|
|
"$mainMod, left, movefocus, l"
|
2023-12-04 00:40:27 -05:00
|
|
|
"$mainMod, right, movefocus, r"
|
2024-06-15 01:40:26 -04:00
|
|
|
"$mainMod, up, movefocus, u"
|
|
|
|
"$mainMod, down, movefocus, d"
|
2023-12-04 00:40:27 -05:00
|
|
|
|
|
|
|
## Move to specific workspaces
|
|
|
|
"$mainMod, 1, workspace, 1"
|
|
|
|
"$mainMod, 2, workspace, 2"
|
|
|
|
"$mainMod, 3, workspace, 3"
|
|
|
|
"$mainMod, 4, workspace, 4"
|
|
|
|
"$mainMod, 5, workspace, 5"
|
|
|
|
"$mainMod, 6, workspace, 6"
|
|
|
|
"$mainMod, 7, workspace, 7"
|
|
|
|
"$mainMod, 8, workspace, 8"
|
|
|
|
"$mainMod, 9, workspace, 9"
|
|
|
|
"$mainMod, 0, workspace, 10"
|
|
|
|
|
|
|
|
# Move active window to a workspace
|
|
|
|
"$mainMod SHIFT, 1, movetoworkspace, 1"
|
|
|
|
"$mainMod SHIFT, 2, movetoworkspace, 2"
|
|
|
|
"$mainMod SHIFT, 3, movetoworkspace, 3"
|
|
|
|
"$mainMod SHIFT, 4, movetoworkspace, 4"
|
|
|
|
"$mainMod SHIFT, 5, movetoworkspace, 5"
|
|
|
|
"$mainMod SHIFT, 6, movetoworkspace, 6"
|
|
|
|
"$mainMod SHIFT, 7, movetoworkspace, 7"
|
|
|
|
"$mainMod SHIFT, 8, movetoworkspace, 8"
|
|
|
|
"$mainMod SHIFT, 9, movetoworkspace, 9"
|
|
|
|
"$mainMod SHIFT, 0, movetoworkspace, 10"
|
|
|
|
|
2024-06-15 01:40:26 -04:00
|
|
|
",XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
2023-12-04 00:40:27 -05:00
|
|
|
",XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle"
|
|
|
|
];
|
|
|
|
|
|
|
|
binde = [
|
2024-02-27 16:55:01 -05:00
|
|
|
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+ & ags -r 'popup_osd(\"speaker\")' &"
|
|
|
|
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- & ags -r 'popup_osd(\"speaker\")' &"
|
2023-12-04 00:40:27 -05:00
|
|
|
];
|
|
|
|
|
|
|
|
# Mouse Binds
|
|
|
|
bindm = [
|
|
|
|
"$mainMod, mouse:272, movewindow"
|
|
|
|
"$mainMod, mouse:273, resizewindow"
|
|
|
|
];
|
|
|
|
|
|
|
|
misc = {
|
|
|
|
disable_hyprland_logo = true;
|
|
|
|
disable_splash_rendering = true;
|
|
|
|
vfr = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
dwindle = {
|
|
|
|
smart_split = true;
|
|
|
|
special_scale_factor = 0.8;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-02-05 06:25:43 -05:00
|
|
|
# libs
|
2023-12-04 00:40:27 -05:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
# tools
|
|
|
|
bluez-tools
|
|
|
|
brightnessctl
|
|
|
|
pulseaudio
|
2023-12-04 01:13:24 -05:00
|
|
|
alsa-utils
|
|
|
|
p7zip # for reshade
|
2023-12-04 00:40:27 -05:00
|
|
|
|
|
|
|
qt5.qtwayland
|
|
|
|
qt6.qtwayland
|
|
|
|
libayatana-appindicator
|
|
|
|
xdg-utils
|
|
|
|
evtest
|
|
|
|
glib
|
|
|
|
xorg.xrandr
|
|
|
|
libinput
|
|
|
|
xclip
|
|
|
|
libnotify
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|