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

54 lines
1.1 KiB
Nix
Raw Normal View History

{ config, libs, pkgs, ... }:
2025-04-26 19:35:04 +08:00
let
confPath = "modules/home/hyprland/conf";
2025-04-26 19:35:04 +08:00
in
2025-04-25 23:10:55 +08:00
{
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;
2025-04-26 19:35:04 +08:00
systemd.enable = false;
2025-04-25 23:10:55 +08:00
};
home.packages = with pkgs; [
hyprshot #screenshot
2025-04-25 23:10:55 +08:00
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
2025-04-25 23:10:55 +08:00
];
programs = {
swaylock.enable = true;
};
2025-04-26 19:35:04 +08:00
# 使用map函数循环 conf 变量,动态的生成 home.file.<user>.config.${i}
xdg.configFile = builtins.listToAttrs
(builtins.map
(name: {
inherit name;
value = {
source = config.home-libs.mkOutOfStoreSymlink "${confPath}/${name}";
2025-04-26 19:35:04 +08:00
};
})
(builtins.attrNames (builtins.readDir ./conf))
2025-04-26 19:35:04 +08:00
);
2025-04-25 23:10:55 +08:00
}