mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 08:14:00 +01:00
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:
parent
9c95252be4
commit
ea4c8d16dd
@ -1,11 +1,17 @@
|
||||
{
|
||||
specialisation = {
|
||||
gnome.configuration.imports = [
|
||||
../specializations/gnome.nix
|
||||
];
|
||||
{ config, lib, ... }:
|
||||
|
||||
plasma.configuration.imports = [
|
||||
../specializations/plasma.nix
|
||||
];
|
||||
let
|
||||
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 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user