Collection of nix flake templates
1{
2 description = "yemou's nix flake templates";
3
4 outputs =
5 { self, nixpkgs }:
6 let
7 systems = [ "x86_64-linux" ];
8 forSystems = func: nixpkgs.lib.genAttrs systems (system: func (import nixpkgs { inherit system; }));
9 in
10 {
11 formatter = forSystems (pkgs: pkgs.nixfmt-tree.override { settings.formatter.nixfmt.options = [ "-w 120" ]; });
12
13 templates = {
14 default = {
15 path = ./default;
16 description = "generic nix flake";
17 };
18 }
19 // nixpkgs.lib.genAttrs [ "erlang" "go" "java" "python" ] (language: {
20 path = ./${language};
21 description = "${language} nix flake";
22 });
23
24 defaultTemplate = self.templates.default;
25 };
26}