mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-27 20:01:29 +01:00
46 lines
855 B
Nix
46 lines
855 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}@args:
|
|
let
|
|
cfg = config.modules.desktop.hyprland;
|
|
in
|
|
{
|
|
options.modules.desktop.hyprland = {
|
|
enable = lib.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 = lib.mkIf cfg.enable (
|
|
lib.mkMerge [
|
|
{
|
|
wayland.windowManager.hyprland.settings = cfg.settings;
|
|
}
|
|
(import ./hyprland.nix args)
|
|
(import ./xdg.nix args)
|
|
]
|
|
);
|
|
}
|