2022-04-09 21:33:13 +03:00
|
|
|
lib:
|
2022-04-10 05:48:34 +03:00
|
|
|
lib.makeExtensible (self: {
|
2022-04-09 21:33:13 +03:00
|
|
|
defaultSystems = import ./systems.nix;
|
2022-04-10 05:48:34 +03:00
|
|
|
genSystems = lib.genAttrs self.defaultSystems;
|
2022-04-09 21:33:13 +03:00
|
|
|
|
2022-08-11 05:44:58 +03:00
|
|
|
pkgBin = pkg:
|
|
|
|
if (pkg.meta or {}) ? mainProgram
|
|
|
|
then "${pkg}/bin/${pkg.meta.mainProgram}"
|
|
|
|
else "${pkg}/bin/${pkg.pname}";
|
|
|
|
|
|
|
|
prefixStrings = prefix: strings:
|
|
|
|
lib.forEach strings (string: "${prefix}${string}");
|
2022-08-14 10:45:17 +03:00
|
|
|
|
2022-08-23 08:18:37 +03:00
|
|
|
importFolder = modules: let
|
|
|
|
b = builtins;
|
|
|
|
files = b.readDir modules;
|
2023-05-05 03:50:25 +03:00
|
|
|
fileNames = b.attrNames files;
|
2022-08-23 08:18:37 +03:00
|
|
|
filesToImport =
|
2023-05-05 03:50:25 +03:00
|
|
|
b.map
|
|
|
|
(name: "${modules}/${name}")
|
|
|
|
(b.filter (name: b.match ".*\.nix" name != null) fileNames);
|
2022-08-23 08:18:37 +03:00
|
|
|
in
|
|
|
|
filesToImport;
|
2022-10-04 02:08:44 +03:00
|
|
|
|
|
|
|
colors = import ./colors.nix lib;
|
2022-04-09 21:33:13 +03:00
|
|
|
})
|