mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-08 22:05:06 +02:00
feat: modular hyprland's configurations
This commit is contained in:
@@ -10,22 +10,38 @@ with lib; let
|
||||
in {
|
||||
imports = [
|
||||
anyrun.homeManagerModules.default
|
||||
./nvidia.nix
|
||||
./options
|
||||
];
|
||||
|
||||
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
|
||||
(map
|
||||
(path: import path args)
|
||||
[
|
||||
./hyprland.nix
|
||||
./packages.nix
|
||||
./anyrun.nix
|
||||
./wayland-apps.nix
|
||||
])
|
||||
mkMerge ([
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = cfg.settings;
|
||||
}
|
||||
]
|
||||
++ (import ./values args))
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user