1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00
nix-darwin/default.nix
Graham Christensen 09284ab00b Install darwin-uninstall by default, which includes the 'empty' config it switches to
Co-Authored-By: Michael Hoang <enzime@users.noreply.github.com>
2023-11-16 17:47:24 +11:00

34 lines
937 B
Nix

{ nixpkgs ? <nixpkgs>
, configuration ? <darwin-config>
, lib ? pkgs.lib
, pkgs ? import nixpkgs { inherit system; }
, system ? builtins.currentSystem
}:
let
eval = import ./eval-config.nix {
inherit lib;
modules = [
configuration
{ nixpkgs.source = lib.mkDefault nixpkgs; }
] ++ lib.optional (system != null) {
nixpkgs.system = lib.mkDefault system;
};
};
# The source code of this repo needed by the installer.
nix-darwin = lib.cleanSource (
lib.cleanSourceWith {
# We explicitly specify a name here otherwise `cleanSource` will use the
# basename of ./. which might be different for different clones of this
# repo leading to non-reproducible outputs.
name = "nix-darwin";
src = ./.;
}
);
in
eval // {
installer = pkgs.callPackage ./pkgs/darwin-installer { inherit nix-darwin; };
uninstaller = pkgs.callPackage ./pkgs/darwin-uninstaller { };
}