1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-28 18:57:08 +00:00

Merge pull request from isabelroses/installTools

feat: system.disableInstallerTools
This commit is contained in:
Michael Hoang 2024-08-22 14:09:15 +10:00 committed by GitHub
commit a8968d88e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,8 +13,19 @@ let
in
{
options = {
system.includeUninstaller = lib.mkOption {
options.system = {
disableInstallerTools = lib.mkOption {
type = lib.types.bool;
internal = true;
default = false;
description = ''
Disable darwin-rebuild and darwin-option. This is useful to shrink
systems which are not expected to rebuild or reconfigure themselves.
Use at your own risk!
'';
};
includeUninstaller = lib.mkOption {
type = lib.types.bool;
internal = true;
default = true;
@ -23,10 +34,10 @@ in
config = {
environment.systemPackages =
[ # Include nix-tools by default
[ darwin-version ]
++ lib.optionals (!config.system.disableInstallerTools) [
darwin-option
darwin-rebuild
darwin-version
] ++ lib.optional config.system.includeUninstaller darwin-uninstaller;
system.build = {