1
1
mirror of https://github.com/divnix/digga.git synced 2024-11-27 17:36:06 +03:00
digga/lib/flake.nix

88 lines
1.9 KiB
Nix
Raw Normal View History

2021-04-02 05:10:24 +03:00
{
description = "DevOS environment configuriguration library.";
inputs =
{
deploy.url = "github:serokell/deploy-rs";
deploy.inputs = {
2021-04-19 01:23:27 +03:00
utils.follows = "utils";
2021-04-02 05:10:24 +03:00
};
devshell.url = "github:numtide/devshell";
2021-04-19 01:23:27 +03:00
utils.url = "github:numtide/flake-utils";
2021-04-02 05:10:24 +03:00
};
2021-04-19 01:23:27 +03:00
outputs = inputs@{ self, nixpkgs, deploy, devshell, utils, ... }: let
2021-04-02 05:10:24 +03:00
2021-04-19 05:45:08 +03:00
lib = nixpkgs.lib.makeExtensible (self:
2021-04-19 01:40:57 +03:00
let
2021-04-19 05:45:08 +03:00
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-19 01:40:57 +03:00
in
2021-04-18 04:56:24 +03:00
utils.lib
//
2021-04-02 05:10:24 +03:00
{
2021-04-19 05:45:08 +03:00
os = import ./devos {
lib = nixpkgs.lib // self;
inherit utils;
};
2021-04-02 05:10:24 +03: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 05:10:24 +03:00
};
pkgs-lib = import ./pkgs-lib {
2021-04-19 05:45:08 +03:00
lib = nixpkgs.lib // self;
inherit nixpkgs deploy devshell;
};
2021-04-02 05:10:24 +03:00
2021-04-19 05:45:08 +03:00
inherit (attrs)
mapFilterAttrs
genAttrs'
safeReadDir
pathsToImportedAttrs
concatAttrs
filterPackages;
2021-04-02 05:10:24 +03:00
inherit (lists) pathsIn;
inherit (strings) rgxToString;
2021-04-18 04:56:24 +03:00
}
);
2021-04-02 05:10:24 +03:00
2021-04-19 01:23:27 +03:00
in
{
2021-04-02 05:10:24 +03:00
2021-04-18 04:56:24 +03:00
lib = utils.lib // {
2021-04-19 05:45:08 +03:00
inherit (lib)
mkFlake;
2021-04-02 05:10:24 +03:00
};
2021-04-19 01:23:27 +03:00
}
//
utils.lib.eachDefaultSystem (system:
let
nixpkgs' = import nixpkgs { inherit system; overlays = []; config = {}; };
2021-04-02 05:10:24 +03:00
in
{
2021-04-19 01:23:27 +03:00
checks = {
tests = import ./tests {
inherit (nixpkgs') pkgs;
2021-04-19 05:45:08 +03:00
lib = nixpkgs.lib // lib;
2021-04-19 01:23:27 +03:00
};
2021-04-02 05:10:24 +03:00
};
}
2021-04-19 01:23:27 +03:00
);
2021-04-02 05:10:24 +03:00
}