forked from DGNum/infrastructure
Tom Hubrecht
ecbad0a638
This adds subdirectories for the different types of systems, for the modules and the machines
16 lines
554 B
Nix
16 lines
554 B
Nix
{ lib, pkgs }:
|
|
source:
|
|
let
|
|
#import metis stuff
|
|
metisCalendarData = builtins.fromJSON (builtins.readFile (source + /data/calendars.json));
|
|
calendars = metisCalendarData.sources;
|
|
inherit (import source { inherit pkgs; }) providers;
|
|
|
|
# helper function to map 2-level deep attribute-sets
|
|
mapDeepAttrs =
|
|
mapFct:
|
|
lib.concatMapAttrs (name: value: lib.mapAttrs' (name': value': mapFct name name' value') value);
|
|
|
|
toLinkal = upstream: identifier: lib.nameValuePair "${providers.${upstream}}${identifier}";
|
|
in
|
|
mapDeepAttrs toLinkal calendars
|