71 lines
1.7 KiB
Nix
71 lines
1.7 KiB
Nix
{ config
|
|
, lib
|
|
, pkgs
|
|
, inputs
|
|
, ...
|
|
}:
|
|
|
|
with lib;
|
|
let
|
|
cfg = config.my.programs.hyprland;
|
|
|
|
hyprland-default = inputs.hyprland.packages.${pkgs.system}.default;
|
|
hyprland-nvidia = hyprland-default.override { nvidiaPatches = true; };
|
|
hyprland = if cfg.nvidiaSupport then hyprland-nvidia else hyprland-default;
|
|
in
|
|
{
|
|
options.my.programs.hyprland = {
|
|
enable = mkEnableOption "hyprland";
|
|
nvidiaSupport = mkEnableOption "enable nvidia Support";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
home-manager.users.moritz = {
|
|
imports = [ inputs.hyprland.homeManagerModules.default ];
|
|
programs.waybar = {
|
|
enable = true;
|
|
package = pkgs.waybar-hyprland;
|
|
systemd.enable = true;
|
|
settings = {
|
|
mainBar = {
|
|
layer = "top";
|
|
position = "top";
|
|
height = 30;
|
|
output = [
|
|
"eDP-1"
|
|
"HDMI-A-1"
|
|
];
|
|
modules-left = [ "wlr/workspaces" ];
|
|
modules-center = [ "hyprland/window" ];
|
|
modules-right = [ "network" "memory" "cpu" "battery" "clock" ];
|
|
modules = {
|
|
"wlr/workspaces" = {
|
|
on-click = "activate";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
wayland.windowManager.hyprland = {
|
|
enable = true;
|
|
package = hyprland;
|
|
extraConfig = builtins.readFile ./hyprland.conf;
|
|
};
|
|
};
|
|
programs.hyprland = {
|
|
enable = true;
|
|
package = null;
|
|
};
|
|
services.xserver = {
|
|
enable = true;
|
|
displayManager = {
|
|
gdm.enable = true;
|
|
sessionPackages = [ hyprland ];
|
|
};
|
|
};
|
|
xdg.portal = {
|
|
enable = true;
|
|
wlr.enable = true;
|
|
};
|
|
};
|
|
}
|