mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-25 08:06:19 +02:00
refactor: cleanup
This commit is contained in:
parent
3aa45471d8
commit
ec6fefe59c
9 changed files with 13 additions and 66 deletions
|
@ -38,32 +38,8 @@
|
|||
add_header Access-Control-Allow-Origin *;
|
||||
return 200 '${builtins.toJSON data}';
|
||||
'';
|
||||
user = "rfive-web";
|
||||
group = "rfive-web";
|
||||
in
|
||||
{
|
||||
users.users.${user} = {
|
||||
group = group;
|
||||
isSystemUser = true;
|
||||
};
|
||||
users.groups.${group} = { };
|
||||
services.phpfpm.pools.rfivede = {
|
||||
user = user;
|
||||
group = group;
|
||||
settings = {
|
||||
"listen.owner" = config.services.nginx.user;
|
||||
"pm" = "dynamic";
|
||||
"pm.max_children" = 32;
|
||||
"pm.max_requests" = 500;
|
||||
"pm.start_servers" = 2;
|
||||
"pm.min_spare_servers" = 2;
|
||||
"pm.max_spare_servers" = 5;
|
||||
"php_admin_value[error_log]" = "stderr";
|
||||
"php_admin_flag[log_errors]" = true;
|
||||
"catch_workers_output" = true;
|
||||
};
|
||||
phpEnv."PATH" = lib.makeBinPath [ pkgs.php ];
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
networking.firewall.allowedUDPPorts = [ 443 ];
|
||||
services.nginx = {
|
||||
|
@ -77,24 +53,7 @@
|
|||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "/srv/web/${config.networking.domain}";
|
||||
extraConfig = ''
|
||||
index index.html index.php;
|
||||
'';
|
||||
locations = {
|
||||
"/" = {
|
||||
tryFiles = "$uri $uri/ /index.php?$query_string";
|
||||
};
|
||||
"~ \.php$" = {
|
||||
extraConfig = ''
|
||||
try_files $uri =404;
|
||||
fastcgi_pass unix:${config.services.phpfpm.pools.rfivede.socket};
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_index index.php;
|
||||
include ${pkgs.nginx}/conf/fastcgi_params;
|
||||
include ${pkgs.nginx}/conf/fastcgi.conf;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
|
||||
'';
|
||||
};
|
||||
"/.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
|
||||
"/.well-known/matrix/server".extraConfig = mkWellKnown serverConfig;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
|
||||
imports =
|
||||
|
|
|
@ -32,8 +32,9 @@
|
|||
"/home/*/.wine*"
|
||||
"/home/*/.mypy_cache*"
|
||||
"/home/*/.local/share"
|
||||
"/home/*/.local/share"
|
||||
"/home/*/Linux/Isos"
|
||||
# contains very big files that don't need to clutter up the backup
|
||||
# if I ever happen to have important data in virtual machines, this can be reconsidered
|
||||
"/var/lib/libvirt"
|
||||
];
|
||||
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets."borg/passphrase".path}";
|
||||
compression = "lz4";
|
||||
|
|
|
@ -10,5 +10,6 @@
|
|||
environment.systemPackages = with pkgs; [
|
||||
helvum
|
||||
easyeffects
|
||||
pavucontrol
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue