1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-06 16:57:08 +00:00
nix-darwin/modules/nix/nix-darwin.nix
Emily 02232f71c5 nix-tools: drop nixPackage
We already put `/nix/var/nix/profiles/default/bin` on the `$PATH`,
and whatever `nix.package` is set to already gets installed into
`/run/current-system/sw/bin`, so this is pointless.
2025-01-18 20:31:54 +00:00

46 lines
1.1 KiB
Nix

{ config, pkgs, lib, ... }:
let
nix-tools = pkgs.callPackage ../../pkgs/nix-tools {
inherit (config.system) profile;
inherit (config.environment) systemPath;
};
darwin-uninstaller = pkgs.callPackage ../../pkgs/darwin-uninstaller { };
inherit (nix-tools) darwin-option darwin-rebuild darwin-version;
in
{
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;
};
};
config = {
environment.systemPackages =
[ darwin-version ]
++ lib.optionals (!config.system.disableInstallerTools) [
darwin-option
darwin-rebuild
] ++ lib.optional config.system.includeUninstaller darwin-uninstaller;
system.build = {
inherit darwin-option darwin-rebuild darwin-version;
};
};
}