mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
33 lines
855 B
Nix
33 lines
855 B
Nix
{ nixpkgs ? <nixpkgs>, configuration ? <darwin-config>, system ? builtins.currentSystem
|
|
, pkgs ? import nixpkgs { inherit system; }
|
|
}:
|
|
|
|
let
|
|
baseModules = import ./modules/module-list.nix;
|
|
modules = [ configuration packages ] ++ baseModules;
|
|
|
|
packages = { config, lib, pkgs, ... }: {
|
|
_file = ./default.nix;
|
|
config = {
|
|
_module.args.pkgs = import nixpkgs config.nixpkgs;
|
|
nixpkgs.system = system;
|
|
};
|
|
};
|
|
|
|
eval = pkgs.lib.evalModules {
|
|
inherit modules;
|
|
args = { inherit baseModules modules; };
|
|
specialArgs = { modulesPath = ./modules; };
|
|
check = true;
|
|
};
|
|
in
|
|
|
|
{
|
|
inherit (eval.config._module.args) pkgs;
|
|
inherit (eval) options config;
|
|
|
|
system = eval.config.system.build.toplevel;
|
|
|
|
installer = pkgs.callPackage ./pkgs/darwin-installer {};
|
|
uninstaller = pkgs.callPackage ./pkgs/darwin-uninstaller {};
|
|
}
|