about summary refs log tree commit diff stats
path: root/flake.nix
blob: 5a85b1ea889df18c51582f3e4ed86ad88de36e2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
  description = "A collection of nix flake templates";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";

    flake-utils = {
      url = "github:numtide/flake-utils";
      inputs = {
        systems.follows = "systems";
      };
    };

    systems = {
      url = "github:nix-systems/x86_64-linux"; # only evaluate for this system
    };
  };

  outputs = {
    nixpkgs,
    flake-utils,
    ...
  }:
    flake-utils.lib.eachDefaultSystem (system: let
      pkgs = nixpkgs.legacyPackages."${system}";
    in {
      devShells.default = pkgs.mkShell {
        packages = with pkgs; [
          nil
          alejandra
          statix
          ltex-ls
          cocogitto
        ];
      };
    })
    // {
      templates = {
        # a b c d e f g h i j k l m n o p q r s t u v w x y z
        awk = {
          path = ./awk;
          description = "An Awk project";
          welcomeText = "Please customize the text in the flake.nix and LICENSE.spdx files; Look at the TODO marks.\n Also run `git init` and `cog install-hook commit-msg`";
        };
        c = {
          path = ./c;
          description = "A C project";
          welcomeText = "Please customize the text in the flake.nix, LICENSE.spdx files and the Makefile BIN_NAME variable; Look at the TODO marks.\n Also run `git init` and `cog install-hook commit-msg`";
        };
        latex = {
          path = ./latex;
          description = "A LaTeX project";
          welcomeText = "Please customize the text in the flake.nix and LICENSE.spdx files; Look at the TODO marks.\n Also run `git init` and `cog install-hook commit-msg` and look at `lpm`";
        };
        markdown = {
          path = ./markdown;
          description = "A Markdown project";
          welcomeText = "Please customize the text in the flake.nix and LICENSE.spdx files; Look at the TODO marks.\n Also run `git init` and `cog install-hook commit-msg`";
        };
        python = {
          path = ./python;
          description = "A Python project";
          welcomeText = "Please customize the text in the flake.nix, LICENSE.spdx and setup.cfg files; Look at the TODO marks.\n Also run `git init` and `cog install-hook commit-msg`";
        };
        rust = {
          path = ./rust;
          description = "A Rust/Crane project";
          welcomeText = "Please customize the text in the flake.nix and LICENSE.spdx files; Look at the TODO marks.\n Also run `git init`, `cargo init` and `cog install-hook commit-msg`";
        };
        shell = {
          path = ./shell;
          description = "A Shell project";
          welcomeText = "Please customize the text in the flake.nix and LICENSE.spdx files; Look at the TODO marks.\n Also run `git init` and `cog install-hook commit-msg`";
        };
      };
    };
}
# vim: ts=2