28e6d8a18d
* feat(modules): add `catppuccin.sources` option * refactor(modules)!: nvfetcher -> npins npins gives us a nicer file to import that is a simple name value pair of the port and the path in the store. this allows for easier overriding with the catppuccin.sources option * fix(modules): ensure default sources are applied to `catppuccin.sources`
14 lines
537 B
Nix
14 lines
537 B
Nix
let
|
|
sources = (builtins.fromJSON (builtins.readFile ../.sources/sources.json)).pins;
|
|
|
|
isGithubSource = source: source.repository.type or "" == "GitHub";
|
|
isInOrg = source: source.repository.owner or "" == "catppuccin";
|
|
|
|
# all github sources should be from the org
|
|
isGoodSource = source: isGithubSource source -> isInOrg source;
|
|
# find the ones that aren't
|
|
badSources = builtins.filter (source: !(isGoodSource source)) (builtins.attrValues sources);
|
|
in
|
|
if ((builtins.length badSources) == 0)
|
|
then "OK"
|
|
else throw "BAD"
|