Collection of nix flake templates

flake.nix: reduce duplication

yemou.pink 79e44f92 43696b51

verified
Changed files
+6 -10
+6 -10
flake.nix
···
templates = {
default = {
path = ./default;
-
description = "Generic nix flake";
-
};
-
erlang = {
-
path = ./erlang;
-
description = "Erlang nix flake";
-
};
-
python = {
-
path = ./python;
-
description = "Python nix flake";
+
description = "generic nix flake";
};
-
};
+
}
+
// nixpkgs.lib.genAttrs [ "erlang" "python" ] (language: {
+
path = ./${language};
+
description = "${language} nix flake";
+
});
defaultTemplate = self.templates.default;
};