Update configuration files
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
c3113b0eec
commit
08e65f606e
27 changed files with 460 additions and 266 deletions
|
|
@ -1,6 +1,9 @@
|
|||
{
|
||||
inputs = {
|
||||
devshell.inputs.nixpkgs.follows = "nixpkgs";
|
||||
devshell.url = "github:numtide/devshell";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
import-tree.url = "github:vic/import-tree";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
process-compose.url = "github:Platonic-Systems/process-compose-flake";
|
||||
services.url = "github:juspay/services-flake";
|
||||
|
|
@ -10,75 +13,6 @@
|
|||
outputs =
|
||||
inputs:
|
||||
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = import inputs.systems;
|
||||
|
||||
imports = [
|
||||
inputs.process-compose.flakeModule
|
||||
];
|
||||
|
||||
perSystem =
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
php = pkgs.php83.buildEnv {
|
||||
extraConfig = ''
|
||||
memory_limit = 128M
|
||||
'';
|
||||
};
|
||||
|
||||
phpPackages = pkgs.php83Packages;
|
||||
|
||||
databasePort = 3306;
|
||||
webPort = 8000;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
|
||||
process-compose."default" = {
|
||||
imports = [
|
||||
inputs.services.processComposeModules.default
|
||||
];
|
||||
|
||||
services = {
|
||||
mysql."mysql1" = {
|
||||
enable = true;
|
||||
|
||||
initialDatabases = [
|
||||
{ name = "drupal-lab"; }
|
||||
];
|
||||
|
||||
settings.mysqld.port = toString databasePort;
|
||||
};
|
||||
};
|
||||
|
||||
settings.processes = {
|
||||
php = {
|
||||
command = pkgs.writeShellApplication {
|
||||
name = "php-local-server";
|
||||
|
||||
text = "${getExe php} -S 127.0.0.1:${toString webPort} -t web";
|
||||
};
|
||||
|
||||
depends_on."mysql1".condition = "process_healthy";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
inputsFrom = [
|
||||
config.process-compose."default".services.outputs.devShell
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
php
|
||||
phpPackages.composer
|
||||
];
|
||||
};
|
||||
};
|
||||
imports = [ (inputs.import-tree ./tools/nix) ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue