ref: simplify pkgs-lib deps injection
This commit is contained in:
parent
362cc31827
commit
8134350545
@ -1,20 +1,9 @@
|
|||||||
args@{ lib, nixpkgs, deploy, devshell }:
|
{ lib, nixpkgs, deploy, devshell }:
|
||||||
lib.genAttrs lib.defaultSystems (system:
|
|
||||||
lib.makeExtensible (final:
|
|
||||||
let
|
|
||||||
pkgs = import nixpkgs { inherit system; };
|
|
||||||
callLibs = file: import file
|
|
||||||
(args // {
|
|
||||||
inherit pkgs system;
|
|
||||||
pkgs-lib = final;
|
|
||||||
});
|
|
||||||
in
|
|
||||||
with final;
|
|
||||||
{
|
|
||||||
inherit callLibs;
|
|
||||||
|
|
||||||
tests = callLibs ./tests;
|
lib.genAttrs
|
||||||
shell = callLibs ./shell;
|
lib.defaultSystems (system:
|
||||||
|
{
|
||||||
|
tests = import ./tests { inherit lib deploy nixpkgs pkgs system; };
|
||||||
|
shell = import ./shell { inherit lib devshell deploy nixpkgs system; };
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
{ lib, devshell, deploy, system, nixpkgs, ... }:
|
{ lib, nixpkgs, devshell, deploy, system }:
|
||||||
let
|
let
|
||||||
overlays = [
|
overlays = [
|
||||||
|
|
||||||
devshell.overlay
|
devshell.overlay
|
||||||
|
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
deploy-rs =
|
deploy-rs =
|
||||||
deploy.packages.${prev.system}.deploy-rs;
|
deploy.packages.${prev.system}.deploy-rs;
|
||||||
})
|
})
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
pkgs = lib.os.pkgImport nixpkgs overlays system;
|
pkgs = import nixpkgs { inherit system overlays;; config = {}; };
|
||||||
|
|
||||||
flk = pkgs.callPackage ./flk.nix { };
|
flk = pkgs.callPackage ./flk.nix { };
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{ pkgs, system, deploy, nixpkgs, lib, ... }:
|
{ lib, nixpkgs, deploy, system }:
|
||||||
let
|
let
|
||||||
|
pkgs = import nixpkgs { inherit system; overlays = []; config = {}; };
|
||||||
|
|
||||||
mkChecks = { hosts, nodes, homes ? { } }:
|
mkChecks = { hosts, nodes, homes ? { } }:
|
||||||
let
|
let
|
||||||
deployHosts = lib.filterAttrs
|
deployHosts = lib.filterAttrs
|
||||||
|
Loading…
Reference in New Issue
Block a user