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
31
drupal-cms/tools/nix/dev-shells.nix
Normal file
31
drupal-cms/tools/nix/dev-shells.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [ inputs.devshell.flakeModule ];
|
||||
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
devshells.default =
|
||||
with pkgs;
|
||||
let
|
||||
php = pkgs.php.buildEnv {
|
||||
extraConfig = ''
|
||||
memory_limit = 128M
|
||||
'';
|
||||
};
|
||||
|
||||
phpPackages = pkgs.phpPackages;
|
||||
in
|
||||
{
|
||||
packages = [
|
||||
mariadb
|
||||
php
|
||||
phpPackages.composer
|
||||
phpactor
|
||||
pv
|
||||
yamlfmt
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
40
drupal-cms/tools/nix/process-compose.nix
Normal file
40
drupal-cms/tools/nix/process-compose.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [ inputs.process-compose.flakeModule ];
|
||||
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
databasePort = 3306;
|
||||
httpPort = 8888;
|
||||
in
|
||||
{
|
||||
process-compose."default" = {
|
||||
imports = [
|
||||
inputs.services.processComposeModules.default
|
||||
];
|
||||
|
||||
services = {
|
||||
mysql."mysql" = {
|
||||
enable = true;
|
||||
|
||||
initialDatabases = [
|
||||
{ name = "drupal_cms"; }
|
||||
];
|
||||
|
||||
settings.mysqld.port = toString databasePort;
|
||||
};
|
||||
};
|
||||
|
||||
settings.processes.php = {
|
||||
command = pkgs.writeShellApplication {
|
||||
name = "drush-server";
|
||||
text = "vendor/bin/drush runserver ${toString httpPort}";
|
||||
};
|
||||
|
||||
depends_on."mysql".condition = "process_healthy";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
5
drupal-cms/tools/nix/systems.nix
Normal file
5
drupal-cms/tools/nix/systems.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
systems = import inputs.systems;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue