mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
add flake.nix for Nix PHP dev shell
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -12,6 +12,10 @@ storage/test.db
|
|||||||
error.log
|
error.log
|
||||||
src/cache/rate_limit/
|
src/cache/rate_limit/
|
||||||
|
|
||||||
|
# Nix
|
||||||
|
.direnv/
|
||||||
|
result
|
||||||
|
|
||||||
# OS files
|
# OS files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|||||||
1
TODO.md
1
TODO.md
@@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
## Pending
|
## Pending
|
||||||
|
|
||||||
|
- [x] Add flake.nix for Nix-based PHP dev environment
|
||||||
- [x] Add favicon (`<link rel="icon">` → admin_favicon.svg) to all pages; nginx 204 for /favicon.ico
|
- [x] Add favicon (`<link rel="icon">` → admin_favicon.svg) to all pages; nginx 204 for /favicon.ico
|
||||||
- [ ] Add pagination to répertoire student index (currently capped at 100)
|
- [ ] Add pagination to répertoire student index (currently capped at 100)
|
||||||
- [ ] Thumbnail generation / cover image support for home grid cards
|
- [ ] Thumbnail generation / cover image support for home grid cards
|
||||||
|
|||||||
49
flake.nix
Normal file
49
flake.nix
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
description = "Post-ERG development environment";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
|
||||||
|
php = pkgs.php84.buildEnv {
|
||||||
|
extensions = ({ enabled, all }: enabled ++ (with all; [
|
||||||
|
curl
|
||||||
|
mbstring
|
||||||
|
pdo
|
||||||
|
pdo_sqlite
|
||||||
|
sqlite3
|
||||||
|
]));
|
||||||
|
extraConfig = ''
|
||||||
|
error_reporting = E_ALL
|
||||||
|
display_errors = On
|
||||||
|
log_errors = On
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
name = "posterg";
|
||||||
|
|
||||||
|
packages = [
|
||||||
|
php
|
||||||
|
pkgs.sqlite
|
||||||
|
pkgs.just
|
||||||
|
pkgs.git
|
||||||
|
];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
echo "🛠 Post-ERG dev shell"
|
||||||
|
echo " php $(php --version | head -1)"
|
||||||
|
echo " just $(just --version)"
|
||||||
|
echo ""
|
||||||
|
echo "Run 'just serve' to start the dev server."
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user