Files
nix/modules/home/hyprland/default.nix

79 lines
1.4 KiB
Nix
Raw Normal View History

2025-04-21 21:32:17 +08:00
{ config, lib, pkgs, ... }:
2023-10-06 12:11:50 +08:00
{
imports = [
./env.nix
];
2025-04-21 21:32:17 +08:00
wayland.windowManager.hyprland = {
# Whether to enable Hyprland wayland compositor
enable = true;
# The hyprland package to use
package = pkgs.hyprland;
# Whether to enable XWayland
xwayland.enable = true;
# Optional
# Whether to enable hyprland-session.target on hyprland startup
systemd.enable = true;
};
2023-10-06 12:11:50 +08:00
home.packages = with pkgs; [
waybar # the status bar
# hyprpaper # wallpaper
swww # wallpaper
dunst # notify
rofi # app launcher
kitty
envsubst
killall
pavucontrol
wlogout
];
programs = {
bash = {
initExtra = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
2025-04-21 21:27:22 +08:00
echo 'Hyprland'
2023-10-06 12:11:50 +08:00
fi
'';
};
swaylock.enable = true;
};
# hyprland configs, based on https://github.com/notwidow/hyprland
home.file.".config/hypr" = {
source = ./conf/hypr;
# copy the scripts directory recursively
recursive = true;
};
home.file.".config/rofi" = {
source = ./conf/rofi;
recursive = true;
};
home.file.".config/kitty" = {
source = ./conf/kitty;
recursive = true;
};
2025-04-21 14:21:37 +08:00
# home.file.".config/swww" = {
# source = ./conf/swww;
# recursive = true;
# };
2023-10-06 12:11:50 +08:00
home.file.".config/waybar" = {
source = ./conf/waybar;
recursive = true;
};
home.file.".config/wlogout" = {
source = ./conf/wlogout;
recursive = true;
};
}