1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-16 21:38:21 +00:00
nix-darwin/modules/nix/nix-darwin.nix

37 lines
834 B
Nix
Raw Normal View History

{ config, pkgs, lib, ... }:
2016-12-12 17:34:43 +01:00
let
nix-tools = pkgs.callPackage ../../pkgs/nix-tools {
inherit (config.system) profile;
inherit (config.environment) systemPath;
nixPackage = config.nix.package;
};
2016-12-12 17:34:43 +01:00
darwin-uninstaller = pkgs.callPackage ../../pkgs/darwin-uninstaller { };
2023-07-02 01:11:16 +10:00
inherit (nix-tools) darwin-option darwin-rebuild darwin-version;
2016-12-12 17:34:43 +01:00
in
{
options = {
system.includeUninstaller = lib.mkOption {
type = lib.types.bool;
internal = true;
default = true;
};
};
2016-12-12 17:34:43 +01:00
config = {
2016-12-12 17:34:43 +01:00
environment.systemPackages =
[ # Include nix-tools by default
darwin-option
darwin-rebuild
2023-07-02 01:11:16 +10:00
darwin-version
] ++ lib.optional config.system.includeUninstaller darwin-uninstaller;
2016-12-12 17:34:43 +01:00
system.build = {
2023-07-02 01:11:16 +10:00
inherit darwin-option darwin-rebuild darwin-version;
};
2016-12-12 17:34:43 +01:00
};
}