-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
57 lines (47 loc) · 1.27 KB
/
flake.nix
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
{
description = "my collection of project templates, managed with nix";
outputs = inputs @ { self, ... }:
let
system = "x86_64-linux";
pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
};
in
{
devShells.x86_64-linux.default = pkgs.mkShell {
buildInputs = with pkgs; [
nil
nixpkgs-fmt
just
];
shellHook = ''
# for all directories called <lang>-project
for dir in $(find . -type d -name '*-project'); do
mkdir -p $dir/.git
touch $dir/.git/DUMMY_GIT_REPO_FOR_DEVELOPMENT
done
'';
};
templates = {
empty = {
path = ./empty-project;
description = "A basic project";
};
go = {
path = ./go-project;
description = "go project with some tools i usually use";
};
bun = {
path = ./bun-project;
description = "bun project";
};
docs = {
path = ./docs-project;
description = "docs project. markdown + css -> pdf via pandoc";
};
default = self.templates.empty;
};
};
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
}