2021-04-02 02:10:24 +00:00
|
|
|
{
|
|
|
|
description = "DevOS environment configuriguration library.";
|
|
|
|
|
|
|
|
inputs =
|
|
|
|
{
|
|
|
|
deploy.url = "github:serokell/deploy-rs";
|
|
|
|
deploy.inputs = {
|
2021-04-18 22:23:27 +00:00
|
|
|
utils.follows = "utils";
|
2021-04-02 02:10:24 +00:00
|
|
|
};
|
|
|
|
devshell.url = "github:numtide/devshell";
|
2021-04-18 22:23:27 +00:00
|
|
|
utils.url = "github:numtide/flake-utils";
|
2021-04-02 02:10:24 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2021-04-18 22:23:27 +00:00
|
|
|
outputs = inputs@{ self, nixpkgs, deploy, devshell, utils, ... }: let
|
2021-04-02 02:10:24 +00:00
|
|
|
|
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
|
|
|
|
# We work with a combined lib, internally ...
|
|
|
|
combinedLib = lib.extend (final: prev:
|
|
|
|
let callLibs = file: import file
|
|
|
|
({
|
|
|
|
lib = final;
|
2021-04-18 02:29:45 +00:00
|
|
|
userFlakeNixos = {};
|
|
|
|
userFlakeSelf = {};
|
|
|
|
userFlakeInputs = {}; # TODO: Erm, theese must become proper arguments to mkFlake
|
2021-04-02 02:10:24 +00:00
|
|
|
} // inputs);
|
|
|
|
in
|
|
|
|
with final;
|
2021-04-18 22:40:57 +00:00
|
|
|
let
|
2021-04-18 02:29:45 +00:00
|
|
|
|
|
|
|
attrs = import ./attrs.nix { lib = prev; };
|
|
|
|
lists = import ./lists.nix { lib = prev; };
|
|
|
|
strings = import ./strings.nix { lib = prev; };
|
2021-04-18 22:40:57 +00:00
|
|
|
in
|
2021-04-18 01:56:24 +00:00
|
|
|
|
|
|
|
utils.lib
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2021-04-02 02:10:24 +00:00
|
|
|
{
|
|
|
|
inherit callLibs;
|
|
|
|
|
2021-04-18 02:29:45 +00:00
|
|
|
os = import ./devos { lib = final; };
|
2021-04-02 02:10:24 +00:00
|
|
|
|
|
|
|
mkFlake = {
|
|
|
|
__functor = callLibs ./mkFlake;
|
|
|
|
evalArgs = callLibs ./mkFlake/evalArgs.nix;
|
|
|
|
evalOldArgs = callLibs ./mkFlake/evalOldArgs.nix;
|
|
|
|
};
|
|
|
|
|
2021-04-18 02:29:45 +00:00
|
|
|
pkgs-lib = import ./pkgs-lib {
|
|
|
|
lib = final;
|
|
|
|
inherit nixpkgs deploy devshell;
|
|
|
|
};
|
2021-04-02 02:10:24 +00:00
|
|
|
|
|
|
|
inherit (attrs) mapFilterAttrs genAttrs' safeReadDir
|
|
|
|
pathsToImportedAttrs concatAttrs filterPackages;
|
|
|
|
inherit (lists) pathsIn;
|
|
|
|
inherit (strings) rgxToString;
|
2021-04-18 01:56:24 +00:00
|
|
|
}
|
|
|
|
);
|
2021-04-02 02:10:24 +00:00
|
|
|
|
2021-04-18 22:23:27 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
{
|
2021-04-02 02:10:24 +00:00
|
|
|
|
|
|
|
# ... but don't force that choice onto the user
|
2021-04-18 01:56:24 +00:00
|
|
|
lib = utils.lib // {
|
2021-04-02 02:10:24 +00:00
|
|
|
mkFlake = combinedLib.mkFlake;
|
|
|
|
pkgs-lib = combinedLib.pkgs-lib;
|
|
|
|
};
|
|
|
|
|
2021-04-18 22:23:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
nixpkgs' = import nixpkgs { inherit system; overlays = []; config = {}; };
|
2021-04-02 02:10:24 +00:00
|
|
|
in
|
|
|
|
{
|
2021-04-18 22:23:27 +00:00
|
|
|
checks = {
|
|
|
|
tests = import ./tests {
|
|
|
|
inherit (nixpkgs') pkgs;
|
|
|
|
lib = combinedLib;
|
|
|
|
};
|
2021-04-02 02:10:24 +00:00
|
|
|
};
|
|
|
|
}
|
2021-04-18 22:23:27 +00:00
|
|
|
);
|
2021-04-02 02:10:24 +00:00
|
|
|
|
|
|
|
}
|