lib.sourceTypes: simplify implementation

Co-authored-by: Alexander Foremny <aforemny@posteo.de>

Changed files
+3 -9
lib
+3 -9
lib/source-types.nix
···
{ lib }:
-
lib.mapAttrs (tname: tset: let
-
defaultSourceType = {
+
let
+
defaultSourceType = tname: {
shortName = tname;
isSource = false;
};
-
-
mkSourceType = sourceTypeDeclaration: let
-
applyDefaults = sourceType: defaultSourceType // sourceType;
-
in lib.pipe sourceTypeDeclaration [
-
applyDefaults
-
];
-
in mkSourceType tset) {
+
in lib.mapAttrs (tname: tset: defaultSourceType tname // tset) {
fromSource = {
isSource = true;