sorta refactor
This commit is contained in:
@@ -1,11 +1,39 @@
|
||||
{
|
||||
imports = [
|
||||
# ./common
|
||||
./cosmic
|
||||
./dms
|
||||
./gnome
|
||||
./hyprland
|
||||
./niri
|
||||
./plasma
|
||||
];
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
osConfig,
|
||||
perSystem,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.desktop;
|
||||
in {
|
||||
imports =
|
||||
[
|
||||
# ./common
|
||||
./cosmic
|
||||
# ./dms
|
||||
# ./gnome
|
||||
./hyprland
|
||||
./niri
|
||||
./plasma
|
||||
]
|
||||
++ (with inputs; [
|
||||
dms.homeModules.dankMaterialShell.default
|
||||
dms.homeModules.dankMaterialShell.niri
|
||||
]);
|
||||
options = {
|
||||
desktop.dms.enable = mkEnableOption "enable DankMaterialShell";
|
||||
desktop.gnome.enable = mkEnableOption "enable gnome desktop";
|
||||
};
|
||||
config = let
|
||||
importWithArgs = file: import file {inherit config inputs lib perSystem pkgs osConfig importWithArgs;};
|
||||
in
|
||||
lib.mergeAttrsList [
|
||||
(mkIf config.desktop.dms.enable (importWithArgs ./dms/module.nix))
|
||||
# (mkIf cfg.dms.enable (importWithArgs ./dms/module.nix))
|
||||
# (mkIf cfg.gnome.enable (importWithArgs ./gnome))
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user