Added: Hyprland

This commit is contained in:
DerGrumpf 2025-03-24 23:01:13 +01:00
parent fd4412e765
commit bfbfeb5fe8
4 changed files with 21 additions and 43 deletions

View File

@ -1,47 +1,22 @@
{ {
pkgs, pkgs,
config,
lib,
anyrun,
... ...
} @ args: }
with lib; let
cfg = config.modules.desktop.hyprland; {
in { programs.hyprland.enable = true;
imports = [ environment.sessionVariables = {
anyrun.homeManagerModules.default NIXOS_OZONE_WL = "1";
./options WLR_NO_HARDWARE_CURSORS = "1";
]; };
options.modules.desktop.hyprland = { environment.systemPackages = with pkgs; [
enable = mkEnableOption "hyprland compositor"; kitty # Terminal
settings = lib.mkOption {
type = with lib.types; let hyprpicker
valueType = hyprcursor
nullOr (oneOf [ hyprlock
bool hypridle
int hyprpaper
float ];
str
path
(attrsOf valueType)
(listOf valueType)
])
// {
description = "Hyprland configuration value";
};
in
valueType;
default = {};
};
};
config = mkIf cfg.enable (
mkMerge ([
{
wayland.windowManager.hyprland.settings = cfg.settings;
}
]
++ (import ./values args))
);
} }

View File

View File

@ -24,10 +24,12 @@
substituters = [ substituters = [
"https://cache.nixos.org" "https://cache.nixos.org"
"https://hyprland.cachix.org"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
]; ];
builders-use-substitutes = true; builders-use-substitutes = true;
}; };

View File

@ -8,6 +8,7 @@
imports = [ imports = [
../../home/core.nix ../../home/core.nix
../../home/hyprland
../../home/programs ../../home/programs
../../home/rofi ../../home/rofi
]; ];