diff options
| author | isabel <isabel@isabelroses.com> | 2024-08-20 15:18:57 +0100 |
|---|---|---|
| committer | isabel <isabel@isabelroses.com> | 2024-08-21 14:29:54 +0100 |
| commit | c06794de03f9aba338ff2d24e3d7f34743e63135 (patch) | |
| tree | 277afdab484dd16ceda83f1f08daf455c6cebc6b /modules | |
| parent | 076b9a905af8a52b866c8db068d6da475839d97b (diff) | |
feat: system.disableInstallerTools
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/nix/nix-darwin.nix | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/modules/nix/nix-darwin.nix b/modules/nix/nix-darwin.nix index ad1ab8f..4a989d7 100644 --- a/modules/nix/nix-darwin.nix +++ b/modules/nix/nix-darwin.nix @@ -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 = { |
