28 lines
806 B
Nix
28 lines
806 B
Nix
{ lib, config, ... }:
|
|
|
|
let
|
|
coreEnabled = config.mySystem.system.core.enable or false;
|
|
in
|
|
{
|
|
# Top-level option for this module
|
|
options.mySystem.system.locale.enable =
|
|
lib.mkEnableOption "Enable Nix & Flake specific settings";
|
|
|
|
# Top-level container for all custom program configs (your myPrograms idea)
|
|
options.myPrograms = lib.mkOption {
|
|
type = lib.types.attrsOf lib.types.any;
|
|
default = {};
|
|
description = "Container for all custom program configurations";
|
|
};
|
|
|
|
# Apply the configuration only if core or locale is enabled
|
|
config = lib.mkIf (coreEnabled || config.mySystem.system.locale.enable) {
|
|
nix.settings = {
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
download-buffer-size = 536870912; # 512 MB
|
|
cores = 2;
|
|
max-jobs = 1;
|
|
};
|
|
};
|
|
}
|