mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-27 11:17:03 +02:00
feat: refactoring configuration with options to make it more modular
This commit is contained in:
30
home/linux/desktop/hyprland/default.nix
Normal file
30
home/linux/desktop/hyprland/default.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
anyrun,
|
||||
...
|
||||
} @ args:
|
||||
with lib; let
|
||||
cfg = config.modules.desktop.hyprland;
|
||||
in {
|
||||
imports = [
|
||||
anyrun.homeManagerModules.default
|
||||
];
|
||||
|
||||
options.modules.desktop.hyprland = {
|
||||
enable = mkEnableOption "hyprland compositor";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (
|
||||
mkMerge
|
||||
(map
|
||||
(path: import path args)
|
||||
[
|
||||
./hyprland.nix
|
||||
./packages.nix
|
||||
./anyrun.nix
|
||||
./wayland-apps.nix
|
||||
])
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user