🚀 add hyprland module
This commit is contained in:
parent
ad7ba759a6
commit
9918bfe0c6
11 changed files with 318 additions and 11 deletions
71
modules/programs/hyprland/default.nix
Normal file
71
modules/programs/hyprland/default.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{ 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue