1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-05 08:17:01 +00:00

feat: system.disableInstallerTools

This commit is contained in:
isabel 2024-08-20 15:18:57 +01:00
parent 076b9a905a
commit c06794de03
No known key found for this signature in database
GPG key ID: 5A87C993E20D89A1

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 = {