devenv for yeswiki WIP

This commit is contained in:
Florian Schmitt 2023-04-08 23:58:44 +03:00
parent 1b3b3ba6de
commit fa08ab4c82
5 changed files with 199 additions and 0 deletions

3
yeswiki-devenv/.envrc Normal file
View file

@ -0,0 +1,3 @@
source_url "https://raw.githubusercontent.com/cachix/devenv/d1f7b48e35e6dee421cfd0f51481d17f77586997/direnvrc" "sha256-YBzqskFZxmNb3kYVoKD9ZixoPXJh1C9ZvTLGFRkauZ0="
use devenv

5
yeswiki-devenv/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
# Devenv
.devenv*
devenv.local.nix

138
yeswiki-devenv/devenv.lock Normal file
View file

@ -0,0 +1,138 @@
{
"nodes": {
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1680782537,
"narHash": "sha256-oQQoEzpuo4fjyPNCu3/Tc+f8hPAvvuoy4bIo9hn7akg=",
"owner": "cachix",
"repo": "devenv",
"rev": "e639583e5974e1d0f58ac110356f7f182d6f6004",
"type": "github"
},
"original": {
"dir": "src/modules",
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1680881774,
"narHash": "sha256-Ou4+/oVbEWr+Lnnsc7yr21bdTTJFql9GvFzhPr7/Tew=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d218e35480c7ea6cbb50ea68e6b1d88f5d2dc451",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1678872516,
"narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1680865110,
"narHash": "sha256-SOBuUZe+icM5zqeEBGRY/fM6BDanEySw4Ph9TQgC3MY=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "a6a5e1fa5327a8809c51bc6c69407b8a76f1a4ec",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks"
}
}
},
"root": "root",
"version": 7
}

50
yeswiki-devenv/devenv.nix Normal file
View file

@ -0,0 +1,50 @@
{ pkgs, config, ... }:
{
packages = [
pkgs.yarn
];
hosts."yeswiki.test" = "127.0.0.1";
languages.javascript.enable = true;
languages.php = {
enable = true;
version = "8.2";
ini = ''
memory_limit = 512M
'';
fpm.pools.web = {
# user = "mrflos";
settings = {
# "clear_env" = "no";
# "listen.owner" = "mrflos";
"pm" = "dynamic";
"pm.max_children" = 5;
"pm.start_servers" = 2;
"pm.min_spare_servers" = 1;
"pm.max_spare_servers" = 5;
};
};
};
services.mysql = {
enable = true;
package = pkgs.mariadb;
};
services.caddy = {
enable = true;
virtualHosts."http://yeswiki.test" = {
extraConfig = ''
root * /var/www/yeswiki
php_fastcgi unix/${config.languages.php.fpm.pools.web.socket}
file_server
'';
};
};
env.GREET = "Environnement de développement de mrflos";
enterShell = ''
echo $GREET
'';
}

View file

@ -0,0 +1,3 @@
inputs:
nixpkgs:
url: github:NixOS/nixpkgs/nixpkgs-unstable