about summary refs log tree commit diff stats
path: root/README.md
blob: 25bba0f148530da5f5f1ab9b0f138bf62d1185c9 (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
<h1 align="center">
  <br>
  <img src="https://upload.wikimedia.org/wikipedia/commons/2/28/Nix_snowflake.svg" alt="nix snowflake logo" width="200">
  <br>
  nix flake templates — just one `nix flake init`
  <br>
  <br>
</h1>

## Quick start

Add this flake to your flake registry, for example on NixOS like this:

```nix
# services/nix/default.nix
nix.registry = {
    t.flake = nix_flake_templates;
};
```

Then you can just create a new directory and run `nix flake init -t t#<template-name>` and
run the `init` script, like so:

```bash
mkdir lfcd
cd lfcd

# initialize the template
nix flake init -t t#rust

# set the executable bit on the `init` script and run it to populate the meta-data.
chmod +x ./init && ./init
```

## Supported templates

These are the actively supported templates (i.e. they are updated, whence I update my
process.). The key features of these templates have been highlighted.

### awk

### c

- Makefile with build directory support

### latex

- `lpm` and a file heavy structure included, to ensure visibility of the document structure at an FS level
- `build.sh` script to automate the building process

### rust

- `Cargo.toml` and `cog.toml` already pre-populated with the values from the `init` script
  to allow a release on `crates.io`.

### shell

- Hooked up to [my shell library](https://shell-lib.b-peetz.de).

## License

Unless explicitly stated otherwise, any contribution intentionally
submitted for inclusion will be licensed under the [GPL-3.0-or-later
License](./COPYING). Beware that this license only affects the code in
this repository, not the generated templates nor the general inclusion
in your flake.