Run treefmt
This commit is contained in:
parent
dc2795129c
commit
3d2748c2d8
2 changed files with 22 additions and 18 deletions
36
nix/lib.nix
36
nix/lib.nix
|
|
@ -35,23 +35,27 @@ let
|
|||
{
|
||||
_file = "${self.printAttrPos (builtins.unsafeGetAttrPos "a" { a = null; })}: inline module";
|
||||
_module.args = {
|
||||
pkgs = let
|
||||
cfg = config.nixpkgs;
|
||||
systemArgs =
|
||||
if cfg.buildPlatform != cfg.hostPlatform then
|
||||
{
|
||||
localSystem = cfg.buildPlatform;
|
||||
crossSystem = cfg.hostPlatform;
|
||||
}
|
||||
else
|
||||
{
|
||||
system = cfg.hostPlatform;
|
||||
};
|
||||
pkgs =
|
||||
let
|
||||
cfg = config.nixpkgs;
|
||||
systemArgs =
|
||||
if cfg.buildPlatform != cfg.hostPlatform then
|
||||
{
|
||||
localSystem = cfg.buildPlatform;
|
||||
crossSystem = cfg.hostPlatform;
|
||||
}
|
||||
else
|
||||
{
|
||||
system = cfg.hostPlatform;
|
||||
};
|
||||
in
|
||||
import nixpkgs ({
|
||||
overlays = overlays ++ cfg.overlays;
|
||||
inherit (config.nixpkgs) config;
|
||||
} // systemArgs);
|
||||
import nixpkgs (
|
||||
{
|
||||
overlays = overlays ++ cfg.overlays;
|
||||
inherit (config.nixpkgs) config;
|
||||
}
|
||||
// systemArgs
|
||||
);
|
||||
utils = import "${nixos}/lib/utils.nix" {
|
||||
inherit lib config pkgs;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,13 +34,13 @@
|
|||
|
||||
overlays = lib.mkOption {
|
||||
type = with types; listOf anything;
|
||||
default = [];
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
config = lib.mkOption {
|
||||
type = types.attrs;
|
||||
description = ''Configuration used to instantiate nixpkgs.'';
|
||||
default = {};
|
||||
default = { };
|
||||
};
|
||||
|
||||
pkgs = lib.mkOption {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue