nix-config/modules/wm/hyprland/default.nix

49 lines
941 B
Nix

{
inputs,
outputs,
lib,
config,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf mkOption types;
cfg = config.horseman.wm.hyprland;
in {
options = {
horseman.wm.hyprland = {
enable = mkEnableOption "HyprLand";
};
};
config = mkIf cfg.enable {
programs.hyprland = {
enable = true;
xwayland.enable = true;
};
security.polkit.enable = true;
environment.systemPackages = with pkgs; [
eww
nerdfonts
networkmanagerapplet
wofi
xdg-desktop-portal-hyprland
playerctl
hyprlock
brightnessctl
swaybg
jq
];
services.logind.extraConfig = ''
HandlePowerKey=ignore
'';
system.activationScripts.script.text = ''
cd /home/horseman;
rm -r .config/hypr .config/eww;
cp -r nix-config/modules/wm/hyprland/config/* .config;
chown -R horseman:users .config/hypr .config/eww
'';
};
}