2021-04-02 04:10:24 +02:00
|
|
|
{
|
|
|
|
description = "DevOS environment configuriguration library.";
|
|
|
|
|
|
|
|
inputs =
|
|
|
|
{
|
|
|
|
deploy.url = "github:serokell/deploy-rs";
|
|
|
|
devshell.url = "github:numtide/devshell";
|
2021-04-19 00:23:27 +02:00
|
|
|
utils.url = "github:numtide/flake-utils";
|
2021-04-02 04:10:24 +02:00
|
|
|
};
|
|
|
|
|
2021-04-24 03:13:03 +02:00
|
|
|
outputs = inputs@{ self, nixpkgs, deploy, devshell, utils, ... }:
|
|
|
|
let
|
2021-04-18 03:56:24 +02:00
|
|
|
|
2021-04-24 03:13:03 +02:00
|
|
|
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; };
|
2021-04-24 17:56:51 +02:00
|
|
|
modules = import ./modules.nix { lib = nixpkgs.lib // self; };
|
2021-04-24 03:13:03 +02:00
|
|
|
in
|
2021-04-18 03:56:24 +02:00
|
|
|
|
2021-04-24 03:13:03 +02:00
|
|
|
utils.lib
|
2021-04-18 03:56:24 +02:00
|
|
|
|
2021-04-24 03:13:03 +02:00
|
|
|
//
|
2021-04-02 04:10:24 +02:00
|
|
|
|
2021-04-24 03:13:03 +02:00
|
|
|
{
|
|
|
|
os = import ./devos {
|
2021-04-19 05:29:28 +02:00
|
|
|
lib = nixpkgs.lib // self;
|
2021-04-24 03:13:03 +02:00
|
|
|
inherit utils;
|
2021-04-19 05:29:28 +02:00
|
|
|
};
|
2021-04-02 04:10:24 +02:00
|
|
|
|
2021-04-24 03:13:03 +02:00
|
|
|
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; };
|
|
|
|
};
|
2021-04-02 04:10:24 +02:00
|
|
|
|
2021-04-24 03:13:03 +02:00
|
|
|
pkgs-lib = import ./pkgs-lib {
|
|
|
|
lib = nixpkgs.lib // self;
|
|
|
|
inherit nixpkgs deploy devshell;
|
|
|
|
};
|
|
|
|
|
|
|
|
inherit (attrs)
|
|
|
|
mapFilterAttrs
|
|
|
|
genAttrs'
|
|
|
|
safeReadDir
|
|
|
|
pathsToImportedAttrs
|
|
|
|
concatAttrs
|
|
|
|
filterPackages;
|
2021-04-26 05:53:16 +02:00
|
|
|
inherit (lists) pathsIn collectProfiles;
|
2021-04-24 03:13:03 +02:00
|
|
|
inherit (strings) rgxToString;
|
2021-04-24 17:56:51 +02:00
|
|
|
inherit modules;
|
2021-04-24 03:13:03 +02:00
|
|
|
}
|
|
|
|
);
|
2021-04-02 04:10:24 +02:00
|
|
|
|
2021-04-24 03:13:03 +02:00
|
|
|
in
|
2021-04-19 00:23:27 +02:00
|
|
|
|
2021-04-24 03:13:03 +02:00
|
|
|
{
|
|
|
|
lib = utils.lib // {
|
|
|
|
inherit (lib)
|
|
|
|
mkFlake;
|
|
|
|
};
|
2021-04-02 04:10:24 +02:00
|
|
|
|
2021-04-24 03:13:03 +02:00
|
|
|
}
|
2021-04-19 00:23:27 +02:00
|
|
|
|
2021-04-24 03:13:03 +02:00
|
|
|
//
|
2021-04-19 00:23:27 +02:00
|
|
|
|
2021-04-24 03:13:03 +02:00
|
|
|
utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
in
|
2021-04-02 04:10:24 +02:00
|
|
|
{
|
2021-04-19 00:23:27 +02:00
|
|
|
checks = {
|
|
|
|
tests = import ./tests {
|
2021-04-24 03:13:03 +02:00
|
|
|
inherit pkgs;
|
2021-04-19 04:45:08 +02:00
|
|
|
lib = nixpkgs.lib // lib;
|
2021-04-19 00:23:27 +02:00
|
|
|
};
|
2021-04-02 04:10:24 +02:00
|
|
|
};
|
2021-04-24 17:14:58 +02:00
|
|
|
packages = {
|
|
|
|
mkFlakeDoc = pkgs.writeText "mkFlakeOptions.md"
|
|
|
|
(
|
|
|
|
pkgs.nixosOptionsDoc {
|
|
|
|
inherit (lib.mkFlake.evalArgs { nixos = "nixos"; args = { }; }) options;
|
|
|
|
}
|
|
|
|
).optionsMDDoc;
|
|
|
|
};
|
2021-04-02 04:10:24 +02:00
|
|
|
}
|
2021-04-24 03:13:03 +02:00
|
|
|
);
|
2021-04-02 04:10:24 +02:00
|
|
|
|
|
|
|
}
|