nix/option/Package.nix

32 lines
882 B
Nix
Raw Normal View History

{ lib, config, ... }:
let
2025-01-18 21:20:02 +03:00
cfg = config.module.package;
purpose = config.module.purpose;
in
2024-11-16 04:43:59 +03:00
{
options.module.package = {
2025-01-18 21:20:02 +03:00
all = lib.mkEnableOption "All apps.";
core = lib.mkEnableOption "Core apps." // {
default = true;
};
common = lib.mkEnableOption "Common Apps." // {
2025-01-18 21:20:02 +03:00
default = cfg.all || (with purpose; desktop || laptop);
};
creative = lib.mkEnableOption "Creative Apps." // {
2025-01-18 21:20:02 +03:00
default = cfg.all || purpose.creative;
};
desktop = lib.mkEnableOption "Desktop Apps." // {
2025-01-18 21:20:02 +03:00
default = cfg.all || (with purpose; desktop || laptop);
};
dev = lib.mkEnableOption "Dev Apps." // {
2025-01-18 21:20:02 +03:00
default = cfg.all || purpose.work;
};
gaming = lib.mkEnableOption "Gaming Apps." // {
2025-01-18 21:20:02 +03:00
default = cfg.all || purpose.gaming;
};
extra = lib.mkEnableOption "Extra Apps." // {
default = cfg.all;
};
};
2024-11-16 04:43:59 +03:00
}