64 lines
1.3 KiB
Nix
64 lines
1.3 KiB
Nix
{ config, libs, pkgs, ... }:
|
|
let
|
|
conf = [ "hypr" "waybar" "rofi" "kitty" "mako" "wlogout" ];
|
|
confPath = "modules/home/hyprland/conf";
|
|
in
|
|
{
|
|
imports = [
|
|
./env.nix
|
|
];
|
|
|
|
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;
|
|
systemd.enable = false;
|
|
};
|
|
|
|
home.packages = with pkgs; [
|
|
hyprshot #screenshot
|
|
waybar # the status bar
|
|
swww # wallpaper
|
|
libnotify # for notify-send command
|
|
mako # notify daemon
|
|
rofi # app launcher
|
|
kitty # terminal
|
|
wlogout # logout menu
|
|
killall
|
|
pavucontrol # audio control
|
|
nemo #file manager
|
|
jq # json query util
|
|
];
|
|
|
|
|
|
programs = {
|
|
bash = {
|
|
initExtra = ''
|
|
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ];
|
|
then
|
|
echo 'Welcome! '
|
|
fi
|
|
'';
|
|
};
|
|
|
|
swaylock.enable = true;
|
|
};
|
|
|
|
# 使用map函数循环 conf 变量,动态的生成 home.file.<user>.config.${i}
|
|
xdg.configFile = builtins.listToAttrs
|
|
(builtins.map
|
|
(name: {
|
|
inherit name;
|
|
value = {
|
|
source = config.home-libs.mkOutOfStoreSymlink "${confPath}/${name}";
|
|
};
|
|
})
|
|
conf
|
|
);
|
|
}
|
|
|
|
|