mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-26 09:58:25 +02:00
feat: refactoring configuration with options to make it more modular
This commit is contained in:
24
home/linux/desktop/i3/default.nix
Normal file
24
home/linux/desktop/i3/default.nix
Normal 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
|
||||
])
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user