Refactor + Add lib
This commit is contained in:
parent
36d81f2a30
commit
b5168826bf
5 changed files with 14 additions and 8 deletions
|
@ -7,13 +7,14 @@
|
|||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
{
|
||||
lib = import ./lib { inherit (nixpkgs) lib; };
|
||||
} // flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
packages = import ./pkgs {
|
||||
inherit (nixpkgs) lib;
|
||||
inherit pkgs;
|
||||
};
|
||||
});
|
||||
|
|
5
lib/default.nix
Normal file
5
lib/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ lib }:
|
||||
|
||||
{
|
||||
toto = a: b: a + b;
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{ pkgs }:
|
||||
|
||||
let
|
||||
sources = [
|
||||
(import ./go { inherit lib pkgs; })
|
||||
(import ./node { inherit lib pkgs; })
|
||||
(import ./go { inherit pkgs; })
|
||||
(import ./node { inherit pkgs; })
|
||||
];
|
||||
in
|
||||
lib.foldl (a: b: a // b) {} sources
|
||||
pkgs.lib.foldl (a: b: a // b) {} sources
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs }:
|
||||
|
||||
{
|
||||
stripeMock = pkgs.callPackage ./stripe-mock.nix { };
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs }:
|
||||
|
||||
{
|
||||
maildev = pkgs.callPackage ./maildev.nix {};
|
||||
|
|
Loading…
Reference in a new issue