eab0bf074c
Also format all files and add a flake.lock for lib for a folder thats meant to work on other flakes theres never a reason it should need to refer to itself, only other flakes. So "self" and "inputs" are better namings for these variables. The userFlake* is redundant and confusing, when trying to call the functions its hard to figure out how to use them when there are now two lines of arguments to figure out.
88 lines
1.9 KiB
Nix
88 lines
1.9 KiB
Nix
{
|
|
description = "DevOS environment configuriguration library.";
|
|
|
|
inputs =
|
|
{
|
|
deploy.url = "github:serokell/deploy-rs";
|
|
devshell.url = "github:numtide/devshell";
|
|
utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = inputs@{ self, nixpkgs, deploy, devshell, utils, ... }:
|
|
let
|
|
|
|
lib = nixpkgs.lib.makeExtensible (self:
|
|
let
|
|
attrs = import ./attrs.nix { lib = nixpkgs.lib // self; };
|
|
lists = import ./lists.nix { lib = nixpkgs.lib // self; };
|
|
strings = import ./strings.nix { lib = nixpkgs.lib // self; };
|
|
in
|
|
|
|
utils.lib
|
|
|
|
//
|
|
|
|
{
|
|
os = import ./devos {
|
|
lib = nixpkgs.lib // self;
|
|
inherit utils;
|
|
};
|
|
|
|
mkFlake = {
|
|
__functor = import ./mkFlake {
|
|
lib = nixpkgs.lib // self;
|
|
inherit deploy;
|
|
};
|
|
evalArgs = import ./mkFlake/evalArgs.nix { lib = nixpkgs.lib // self; };
|
|
evalOldArgs = import ./mkFlake/evalOldArgs.nix { lib = nixpkgs.lib // self; };
|
|
};
|
|
|
|
pkgs-lib = import ./pkgs-lib {
|
|
lib = nixpkgs.lib // self;
|
|
inherit nixpkgs deploy devshell;
|
|
};
|
|
|
|
inherit (attrs)
|
|
mapFilterAttrs
|
|
genAttrs'
|
|
safeReadDir
|
|
pathsToImportedAttrs
|
|
concatAttrs
|
|
filterPackages;
|
|
inherit (lists) pathsIn;
|
|
inherit (strings) rgxToString;
|
|
}
|
|
);
|
|
|
|
jobs = import ./jobs { inherit nixpkgs; lib = nixpkgs.lib // lib; };
|
|
|
|
in
|
|
|
|
{
|
|
inherit jobs;
|
|
|
|
lib = utils.lib // {
|
|
inherit (lib)
|
|
mkFlake;
|
|
};
|
|
|
|
}
|
|
|
|
//
|
|
|
|
utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
in
|
|
{
|
|
checks = {
|
|
tests = import ./tests {
|
|
inherit pkgs;
|
|
lib = nixpkgs.lib // lib;
|
|
};
|
|
};
|
|
}
|
|
);
|
|
|
|
}
|