Files
nix-config-ryan4yin/home/linux/gui/hyprland/default.nix
2025-08-20 12:39:43 +08:00

45 lines
835 B
Nix

{
pkgs,
config,
lib,
...
}@args:
with lib;
let
cfg = config.modules.desktop.hyprland;
in
{
options.modules.desktop.hyprland = {
enable = mkEnableOption "hyprland compositor";
settings = lib.mkOption {
type =
with lib.types;
let
valueType =
nullOr (oneOf [
bool
int
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 ./hyprland.nix args)
(import ./xdg.nix args)
]));
}