Run treefmt

This commit is contained in:
r-vdp 2025-02-03 17:11:53 +01:00
parent dc2795129c
commit 3d2748c2d8
No known key found for this signature in database
2 changed files with 22 additions and 18 deletions

View file

@ -35,23 +35,27 @@ let
{ {
_file = "${self.printAttrPos (builtins.unsafeGetAttrPos "a" { a = null; })}: inline module"; _file = "${self.printAttrPos (builtins.unsafeGetAttrPos "a" { a = null; })}: inline module";
_module.args = { _module.args = {
pkgs = let pkgs =
cfg = config.nixpkgs; let
systemArgs = cfg = config.nixpkgs;
if cfg.buildPlatform != cfg.hostPlatform then systemArgs =
{ if cfg.buildPlatform != cfg.hostPlatform then
localSystem = cfg.buildPlatform; {
crossSystem = cfg.hostPlatform; localSystem = cfg.buildPlatform;
} crossSystem = cfg.hostPlatform;
else }
{ else
system = cfg.hostPlatform; {
}; system = cfg.hostPlatform;
};
in in
import nixpkgs ({ import nixpkgs (
overlays = overlays ++ cfg.overlays; {
inherit (config.nixpkgs) config; overlays = overlays ++ cfg.overlays;
} // systemArgs); inherit (config.nixpkgs) config;
}
// systemArgs
);
utils = import "${nixos}/lib/utils.nix" { utils = import "${nixos}/lib/utils.nix" {
inherit lib config pkgs; inherit lib config pkgs;
}; };

View file

@ -34,13 +34,13 @@
overlays = lib.mkOption { overlays = lib.mkOption {
type = with types; listOf anything; type = with types; listOf anything;
default = []; default = [ ];
}; };
config = lib.mkOption { config = lib.mkOption {
type = types.attrs; type = types.attrs;
description = ''Configuration used to instantiate nixpkgs.''; description = ''Configuration used to instantiate nixpkgs.'';
default = {}; default = { };
}; };
pkgs = lib.mkOption { pkgs = lib.mkOption {