feat: refactoring configuration with options to make it more modular

This commit is contained in:
Ryan Yin
2023-12-23 19:34:13 +08:00
parent 1f08d10ac7
commit b75b79057b
106 changed files with 289 additions and 279 deletions

View File

@@ -0,0 +1,24 @@
{
pkgs,
config,
lib,
...
} @ args:
with lib; let
cfg = config.modules.desktop.i3;
in {
options.modules.desktop.i3 = {
enable = mkEnableOption "i3 window manager";
};
config = mkIf cfg.enable (
mkMerge
(map
(path: import path args)
[
./i3.nix
./packages.nix
./x11-apps.nix
])
);
}