nix/host/x86_64-linux/home/Privatebin.nix

44 lines
998 B
Nix
Raw Normal View History

{ __findFile, pkgs, ... }@args:
let
package = (pkgs.callPackage <package/privatebin> args);
in
2024-12-02 21:12:45 +03:00
{
environment.systemPackages = [ package ];
systemd.packages = [ package ];
2024-12-02 21:12:45 +03:00
users.users.paste = {
group = "nginx";
isSystemUser = true;
};
2024-12-02 21:12:45 +03:00
services = {
phpfpm.pools.paste = {
group = "nginx";
user = "paste";
phpPackage = pkgs.php;
settings = {
"catch_workers_output" = true;
"listen.owner" = "nginx";
"php_admin_flag[log_errors]" = true;
"php_admin_value[error_log]" = "stderr";
"pm" = "dynamic";
"pm.max_children" = "32";
"pm.max_requests" = "500";
"pm.max_spare_servers" = "4";
"pm.min_spare_servers" = "2";
"pm.start_servers" = "2";
};
phpEnv = {
# CONFIG_PATH = "${package}/cfg"; # NOTE: Not working?
};
};
2024-12-02 21:12:45 +03:00
nginx = {
enable = true;
virtualHosts."paste.voronind.com" = {
root = "${package}";
};
};
};
2024-12-02 21:12:45 +03:00
}