1
0
Fork 0

Refactor + Add lib

This commit is contained in:
Florian RICHER 2024-04-12 15:37:11 +02:00
parent 36d81f2a30
commit b5168826bf
5 changed files with 14 additions and 8 deletions

View file

@ -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
View file

@ -0,0 +1,5 @@
{ lib }:
{
toto = a: b: a + b;
}

View file

@ -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

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs }:
{
stripeMock = pkgs.callPackage ./stripe-mock.nix { };

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs }:
{
maildev = pkgs.callPackage ./maildev.nix {};