-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
65 lines (53 loc) · 2.4 KB
/
flake.nix
File metadata and controls
65 lines (53 loc) · 2.4 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
{
description = "Template for Drupal development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-php74.url =
"github:NixOS/nixpkgs/6e3a86f2f73a466656a401302d3ece26fba401d9";
flake-parts.url = "github:hercules-ci/flake-parts";
systems.url = "github:nix-systems/default";
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
services-flake.url = "github:juspay/services-flake";
};
outputs = inputs@{ self, nixpkgs, nixpkgs-php74, flake-parts, systems
, process-compose-flake, services-flake, ... }:
let
templateFlake = import ./template/flake.nix;
templateOutputs = templateFlake.outputs inputs;
in {
formatter = nixpkgs.lib.genAttrs (import systems)
(system: let pkgs = import nixpkgs { inherit system; }; in pkgs.nixfmt);
templates.default = {
path = ./template;
description = "Development environment for Drupal with Nix";
welcomeText = ''
# Drupal Development Environment
Your new Drupal environment has been created!
## Quick Start:
1. Edit .env to configure your project and add to git.
2. Run `direnv allow` (optional).
3. Run `nix develop` to get a devShell.
4. Run `?` to see all available commands.
5. Use `start-detached` to start in background, or `start-demo` for a quick demo.
6. Add .direnv, data and other environment-related dirs/files to .gitignore.
```
echo -e ".direnv\n/data" >> .gitignore
```
## Key Commands:
- `start-detached` - Start development environment in background
- `pc-status` - Check if services are running
- `pc-attach` - Connect to running services TUI
- `pc-stop` - Stop services for this project
- `setup-starship-prompt` - Add status indicator to your shell prompt
## Development Workflow:
1. `start-detached` - Start services in background
2. `pc-status` - Verify everything is running
3. Code away! The starship prompt shows when services are active.
4. `pc-stop` - Stop when done
Run `?` in the devShell for complete command reference.
'';
};
# Re-export the template's outputs to maintain direct usability
inherit (templateOutputs) packages apps devShells;
};
}