1
Fork 0
satellite/modules/overlays/myPackages.nix

23 lines
584 B
Nix
Raw Normal View History

{ lib, ... }:
2022-03-10 20:59:18 +01:00
self: super:
let
allThemes = self.callPackage (import ../themes/themes.nix) { };
currentTheme = "github-dark";
in
2022-03-10 20:59:18 +01:00
with self; {
myHelpers = self.callPackage (import ../helpers.nix) { };
myThemes = {
all = allThemes;
current = lib.lists.findFirst (theme: theme.name == currentTheme)
(throw ''
Theme "${currentTheme}" not found.
Available themes are:
${lib.lists.foldr (current: prev: if prev == ""
then current.name
else "${current.name}, ${prev}") "" allThemes}
'')
allThemes;
};
2022-03-10 20:59:18 +01:00
}