mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
improve flakes missing system error message
This commit is contained in:
parent
738eff4f33
commit
e1a3f7292f
2 changed files with 12 additions and 7 deletions
15
flake.nix
15
flake.nix
|
@ -7,11 +7,16 @@
|
|||
# TODO handle multiple architectures.
|
||||
evalConfig = import ./eval-config.nix { inherit (nixpkgs) lib; };
|
||||
|
||||
darwinSystem = { modules, system, inputs ? { }, ... }@args: self.lib.evalConfig (args // {
|
||||
inherit system;
|
||||
inputs = { inherit nixpkgs; darwin = self; } // inputs;
|
||||
modules = modules ++ [ self.darwinModules.flakeOverrides ];
|
||||
});
|
||||
darwinSystem =
|
||||
{ modules, inputs ? { }
|
||||
, system ? throw "darwin.lib.darwinSystem now requires 'system' to be passed explicitly"
|
||||
, ...
|
||||
}@args:
|
||||
self.lib.evalConfig (args // {
|
||||
inherit system;
|
||||
inputs = { inherit nixpkgs; darwin = self; } // inputs;
|
||||
modules = modules ++ [ self.darwinModules.flakeOverrides ];
|
||||
});
|
||||
};
|
||||
|
||||
darwinModules.flakeOverrides = ./modules/system/flake-overrides.nix;
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
in
|
||||
{
|
||||
# Build darwin flake using:
|
||||
# $ darwin-rebuild build --flake ./modules/examples#darwinConfigurations.simple.system \
|
||||
# $ darwin-rebuild build --flake ./modules/examples#simple \
|
||||
# --override-input darwin .
|
||||
darwinConfigurations."simple" = darwin.lib.darwinSystem {
|
||||
system = "x86_64-darwin";
|
||||
modules = [ configuration darwin.darwinModules.simple ];
|
||||
system = "x86_64-darwin";
|
||||
};
|
||||
|
||||
# Expose the package set, including overlays, for convenience.
|
||||
|
|
Loading…
Reference in a new issue