2021-05-04 04:20:12 +03:00
|
|
|
{
|
|
|
|
description = "DevOS environment configuriguration library.";
|
|
|
|
|
|
|
|
inputs =
|
|
|
|
{
|
|
|
|
deploy.url = "github:serokell/deploy-rs";
|
|
|
|
devshell.url = "github:numtide/devshell";
|
|
|
|
utils.url = "github:gytis-ivaskevicius/flake-utils-plus/staging";
|
2021-05-14 03:12:30 +03:00
|
|
|
nixlib.url = "github:divnix/nixpkgs.lib";
|
|
|
|
|
|
|
|
# Only used for development
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs";
|
2021-05-04 04:20:12 +03:00
|
|
|
};
|
|
|
|
|
2021-05-14 03:12:30 +03:00
|
|
|
outputs = inputs@{ self, nixlib, nixpkgs, deploy, devshell, utils, ... }:
|
2021-05-04 04:20:12 +03:00
|
|
|
let
|
2021-05-14 03:12:30 +03:00
|
|
|
lib = nixlib.lib.makeExtensible (self:
|
|
|
|
let combinedLib = nixlib.lib // self; in
|
2021-05-04 04:20:12 +03:00
|
|
|
with self;
|
|
|
|
utils.lib // {
|
2021-05-13 00:54:47 +03:00
|
|
|
attrs = import ./src/attrs.nix { lib = combinedLib; };
|
|
|
|
lists = import ./src/lists.nix { lib = combinedLib; };
|
|
|
|
strings = import ./src/strings.nix { lib = combinedLib; };
|
|
|
|
modules = import ./src/modules.nix { lib = combinedLib; };
|
2021-05-26 18:56:28 +03:00
|
|
|
|
|
|
|
importers = import ./src/importers.nix {
|
|
|
|
lib = combinedLib;
|
|
|
|
inherit devshell;
|
|
|
|
};
|
2021-05-04 04:20:12 +03:00
|
|
|
|
2021-05-13 00:54:47 +03:00
|
|
|
generators = import ./src/generators.nix {
|
2021-05-04 04:20:12 +03:00
|
|
|
lib = combinedLib;
|
|
|
|
inherit deploy;
|
|
|
|
};
|
|
|
|
|
|
|
|
mkFlake = {
|
2021-05-13 00:54:47 +03:00
|
|
|
__functor = import ./src/mkFlake { lib = combinedLib; };
|
|
|
|
evalArgs = import ./src/mkFlake/evalArgs.nix { lib = combinedLib; };
|
2021-05-04 04:20:12 +03:00
|
|
|
};
|
|
|
|
|
2021-05-13 00:54:47 +03:00
|
|
|
pkgs-lib = import ./src/pkgs-lib {
|
2021-05-04 04:20:12 +03:00
|
|
|
lib = combinedLib;
|
|
|
|
inherit deploy devshell;
|
|
|
|
};
|
|
|
|
|
2021-05-27 22:06:13 +03:00
|
|
|
inherit (attrs) mapFilterAttrs genAttrs' concatAttrs;
|
2021-05-25 21:10:29 +03:00
|
|
|
inherit (lists) unifyOverlays;
|
2021-05-04 04:20:12 +03:00
|
|
|
inherit (strings) rgxToString;
|
2021-05-27 22:07:23 +03:00
|
|
|
inherit (importers) profileMap flattenTree rakeLeaves mkProfileAttrs maybeImportDevshellModule;
|
2021-05-04 04:20:12 +03:00
|
|
|
inherit (generators) mkSuites mkDeployNodes mkHomeConfigurations;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
lib = with lib; utils.lib // {
|
|
|
|
inherit attrs lists modules importers generators;
|
|
|
|
inherit (lib)
|
|
|
|
mkFlake
|
|
|
|
mkDeployNodes
|
|
|
|
mkHomeConfigurations;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2021-06-01 01:56:01 +03:00
|
|
|
utils.lib.systemFlake {
|
|
|
|
inherit self inputs;
|
|
|
|
channels.pkgs.input = nixpkgs;
|
|
|
|
outputsBuilder = channels:
|
|
|
|
let inherit (channels) pkgs; in
|
|
|
|
{
|
|
|
|
checks = import ./tests {
|
|
|
|
inherit pkgs;
|
|
|
|
lib = nixlib.lib // lib;
|
2021-05-04 04:20:12 +03:00
|
|
|
};
|
2021-05-05 23:09:28 +03:00
|
|
|
|
2021-06-01 01:56:01 +03:00
|
|
|
devShell = lib.pkgs-lib.shell { inherit pkgs; };
|
2021-05-05 23:09:28 +03:00
|
|
|
|
2021-06-01 01:56:01 +03:00
|
|
|
packages = {
|
|
|
|
mkFlakeDoc = pkgs.writeText "mkFlakeOptions.md"
|
|
|
|
(
|
|
|
|
pkgs.nixosOptionsDoc {
|
|
|
|
inherit (lib.mkFlake.evalArgs { args = { }; }) options;
|
|
|
|
}
|
|
|
|
).optionsMDDoc;
|
|
|
|
};
|
2021-05-04 04:20:12 +03:00
|
|
|
};
|
2021-06-01 01:56:01 +03:00
|
|
|
};
|
2021-05-04 04:20:12 +03:00
|
|
|
|
|
|
|
}
|