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-26 01:46:59 +02:00
|
|
|
utils.url = "github:gytis-ivaskevicius/flake-utils-plus/staging";
|
2021-04-02 04:10:24 +02:00
|
|
|
};
|
|
|
|
|
2021-04-24 03:13:03 +02:00
|
|
|
outputs = inputs@{ self, nixpkgs, deploy, devshell, utils, ... }:
|
|
|
|
let
|
|
|
|
lib = nixpkgs.lib.makeExtensible (self:
|
2021-05-02 10:12:29 +02:00
|
|
|
let combinedLib = nixpkgs.lib // self; in
|
|
|
|
with self;
|
|
|
|
utils.lib // {
|
|
|
|
attrs = import ./attrs.nix { lib = combinedLib; };
|
|
|
|
lists = import ./lists.nix { lib = combinedLib; };
|
|
|
|
strings = import ./strings.nix { lib = combinedLib; };
|
|
|
|
modules = import ./modules.nix { lib = combinedLib; };
|
|
|
|
importers = import ./importers.nix { lib = combinedLib; };
|
|
|
|
generators = import ./generators.nix { lib = combinedLib; };
|
2021-04-02 04:10:24 +02:00
|
|
|
|
2021-04-24 03:13:03 +02:00
|
|
|
mkFlake = {
|
|
|
|
__functor = import ./mkFlake {
|
2021-05-02 10:12:29 +02:00
|
|
|
lib = combinedLib;
|
2021-04-24 03:13:03 +02:00
|
|
|
inherit deploy;
|
|
|
|
};
|
2021-05-02 10:12:29 +02:00
|
|
|
evalArgs = import ./mkFlake/evalArgs.nix { lib = combinedLib; };
|
2021-04-24 03:13:03 +02:00
|
|
|
};
|
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;
|
2021-04-26 01:36:48 +02:00
|
|
|
inherit deploy devshell;
|
2021-04-24 03:13:03 +02:00
|
|
|
};
|
|
|
|
|
2021-05-02 10:12:29 +02:00
|
|
|
inherit (attrs) mapFilterAttrs genAttrs' safeReadDir concatAttrs;
|
|
|
|
inherit (lists) profileMap collectProfiles unifyOverlays;
|
2021-04-24 03:13:03 +02:00
|
|
|
inherit (strings) rgxToString;
|
2021-05-02 10:12:29 +02:00
|
|
|
inherit (importers) mkProfileAttrs pathsIn importHosts;
|
|
|
|
inherit (generators) mkSuites mkDeployNodes mkHomeConfigurations;
|
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
|
|
|
{
|
2021-05-02 10:12:29 +02:00
|
|
|
lib = with lib; utils.lib // {
|
|
|
|
inherit attrs lists modules importers generators;
|
2021-04-24 03:13:03 +02:00
|
|
|
inherit (lib)
|
2021-05-02 10:12:29 +02:00
|
|
|
mkFlake
|
|
|
|
pathsIn
|
|
|
|
importHosts
|
|
|
|
mkDeployNodes
|
|
|
|
mkHomeConfigurations;
|
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 {
|
2021-04-26 01:50:01 +02:00
|
|
|
inherit (lib.mkFlake.evalArgs { args = { }; }) options;
|
2021-04-24 17:14:58 +02:00
|
|
|
}
|
|
|
|
).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
|
|
|
|
|
|
|
}
|