Skip to content

Commit 187f26a

Browse files
fix(template): add welcome text
Signed-off-by: Cameron Smith <cameron.ray.smith@gmail.com>
1 parent a96e436 commit 187f26a

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

nix/modules/template.nix

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,50 @@
55
templates.default = {
66
description = "A Python project template for Nix using uv2nix and flake-parts";
77
path = builtins.path { path = inputs.self; };
8+
welcomeText = ''
9+
Welcome to the python-nix-template!
10+
11+
Don't forget to `cd` into your new project directory.
12+
13+
If you do not have nix and direnv installed, check
14+
15+
```bash
16+
make -n bootstrap
17+
```
18+
19+
and rerun without the `-n` if you are comfortable with the commands. Otherwise,
20+
manually install the nix package manager and direnv.
21+
22+
In order to recognize the `flake.nix` and associated files, create a git
23+
repository, stage the files, and run `direnv allow` to load the environment.
24+
25+
You can copy and paste
26+
27+
```bash
28+
git init && git commit --allow-empty -m "initial commit (empty)" && git add . && direnv allow
29+
```
30+
31+
or, if you prefer, run the commands manually to verify or modify them
32+
33+
```bash
34+
❯ git init
35+
Initialized empty Git repository in ...
36+
37+
❯ git commit --allow-empty -m "initial commit (empty)"
38+
[main (root-commit) bba59e7] initial commit (empty)
39+
40+
❯ git add .
41+
42+
❯ direnv allow
43+
```
44+
45+
You should then be able to run `pytest` to verify the project is working.
46+
See the README for more information.
47+
'';
848
};
949

1050
# https://omnix.page/om/init.html#spec
11-
om.templates.default = {
51+
om.templates.python-nix-template = {
1252
template = templates.default;
1353
params = [
1454
{

0 commit comments

Comments
 (0)