specializations: Make opt-in with mkEnableOption

Specializations basically double the build time for each one added, so
requiring users to explicitly enable it means quicker build times for
those that prefer Hyprland (which is easier to configure declaratively).
This commit is contained in:
Donovan Glover 2024-04-03 02:42:30 -04:00
parent 9c95252be4
commit ea4c8d16dd
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -1,11 +1,17 @@
{ { config, lib, ... }:
specialisation = {
gnome.configuration.imports = [
../specializations/gnome.nix
];
plasma.configuration.imports = [ let
../specializations/plasma.nix cfg = config.modules.specializations;
]; in
{
options.modules.specializations = {
enable = lib.mkEnableOption "specializations";
};
config = lib.mkIf cfg.enable {
specialisation = {
gnome.configuration.imports = [ ../specializations/gnome.nix ];
plasma.configuration.imports = [ ../specializations/plasma.nix ];
};
}; };
} }