-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
76 lines (61 loc) · 2.37 KB
/
flake.nix
File metadata and controls
76 lines (61 loc) · 2.37 KB
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
{
description = "PHP development templates with multiple web server options";
outputs =
{ self }:
{
templates = {
default = {
path = ./template;
description = "PHP development environment with Caddy server (configurable PHP version)";
welcomeText = ''
# PHP Nix Development Environment (Caddy)
## 🚀 Quick Setup
1. **Choose your PHP version**: Edit `flake.nix` and change:
```nix
phpVersion = "85"; # Change to your desired version
```
2. **Available versions**: See https://github.com/fossar/nix-phps
Examples: "81", "82", "83", "84", "85" (recommended)
Legacy: "56", "70", "71", "72", "73", "74", "80"
3. **Enter development environment**:
```bash
nix develop
```
4. **Start Caddy server**:
```bash
./nix/start-caddy.sh
```
Visit: http://localhost:8000
## 📚 More Info
- Template Repository: https://github.com/panakour/php-nix-flake-templates
- Available PHP versions: https://github.com/fossar/nix-phps
'';
};
frankenphp = {
path = ./template-frankenphp;
description = "PHP development environment with FrankenPHP (modern app server, no PHP-FPM needed)";
welcomeText = ''
# PHP Nix Development Environment (FrankenPHP)
## 🚀 Quick Setup
1. **Enter development environment**:
```bash
nix develop
```
2. **Start FrankenPHP server**:
```bash
./nix/start-frankenphp.sh
```
Visit: http://localhost:8000
## ℹ️ Notes
- FrankenPHP embeds its own PHP for serving requests (no PHP-FPM needed)
- CLI PHP (Composer, scripts) uses a separate nix-phps version
- Edit `phpVersion` in `flake.nix` to change the CLI PHP version
## 📚 More Info
- Template Repository: https://github.com/panakour/php-nix-flake-templates
- FrankenPHP: https://frankenphp.dev
- Available CLI PHP versions: https://github.com/fossar/nix-phps
'';
};
};
};
}