Compare commits
2 Commits
a02cefc62a
...
7af4b6a5d1
| Author | SHA1 | Date | |
|---|---|---|---|
| 7af4b6a5d1 | |||
| ca04f5d8c3 |
@@ -28,6 +28,8 @@
|
||||
/home/dominik/projects/cloonar/gbv-aktuell
|
||||
/home/dominik/projects/cloonar/cloonar-technologies-website
|
||||
|
||||
/home/dominik/projects/ownstash/ownstash-api
|
||||
|
||||
/home/dominik/projects/cloonar/paraclub/paraclub-api
|
||||
/home/dominik/projects/cloonar/paraclub/paraclub-frontend
|
||||
/home/dominik/projects/cloonar/paraclub/paraclub-website
|
||||
@@ -47,6 +49,7 @@
|
||||
/home/dominik/projects/epicenter.works/epicenter-nixos
|
||||
/home/dominik/projects/epicenter.works/spenden.akvorrat.at
|
||||
/home/dominik/projects/epicenter.works/whoidentifies.me/wim-api
|
||||
/home/dominik/projects/epicenter.works/whoidentifies.me/wim-frontend
|
||||
|
||||
/home/dominik/projects/cloonar/lena-schilling-website
|
||||
/home/dominik/projects/cloonar/dialog-relations-website
|
||||
|
||||
@@ -616,8 +616,7 @@ in
|
||||
git clone gitea@git.cloonar.com:Cloonar/lego-hetzner-bridge.git ${persistHome}/projects/home-automation/lego-hetzner-bridge 2>/dev/null
|
||||
git clone gitea@git.cloonar.com:Cloonar/ghetto-nixos.git ${persistHome}/projects/home-automation/ghetto-nixos 2>/dev/null
|
||||
|
||||
|
||||
git clone gitea@git.cloonar.com:socialgrow.tech/sgt-api.git ${persistHome}/projects/socialgrow.tech/sgt-api 2>/dev/null
|
||||
git clone gitea@git.cloonar.com:ownstash/api.git ${persistHome}/projects/ownstash/ownstash-api 2>/dev/null
|
||||
|
||||
ssh-keygen -R gitlab.epicenter.works
|
||||
ssh-keyscan gitlab.epicenter.works >> ~/.ssh/known_hosts
|
||||
@@ -628,6 +627,7 @@ in
|
||||
git clone git@github.com:AKVorrat/spenden.akvorrat.at.git ${persistHome}/projects/epicenter.works/spenden.akvorrat.at 2>/dev/null
|
||||
git clone git@github.com:AKVorrat/dearmep-website.git ${persistHome}/projects/epicenter.works/dearmep-website 2>/dev/null
|
||||
git clone git@github.com:whoidentifies-me/api.git ${persistHome}/projects/epicenter.works/whoidentifies.me/wim-api 2>/dev/null
|
||||
git clone git@github.com:whoidentifies-me/frontend.git ${persistHome}/projects/epicenter.works/whoidentifies.me/wim-frontend 2>/dev/null
|
||||
set -eu
|
||||
'';
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ let
|
||||
|
||||
enableMysql = mkEnableOption (lib.mdDoc "MySQL Database");
|
||||
enableDefaultLocations = mkEnableOption (lib.mdDoc "Create default nginx location directives") // { default = true; };
|
||||
enablePhp = mkEnableOption (lib.mdDoc "PHP-FPM support") // { default = true; };
|
||||
|
||||
authorizedKeys = mkOption {
|
||||
type = types.listOf types.str;
|
||||
@@ -138,7 +139,7 @@ in
|
||||
BindPaths = "BindPaths=/var/www/${domain}:/var/www/${domain}";
|
||||
};
|
||||
}
|
||||
) cfg.instances;
|
||||
) (lib.filterAttrs (name: opts: opts.enablePhp) cfg.instances);
|
||||
|
||||
services.phpfpm.pools = mapAttrs' (instance: instanceOpts:
|
||||
let
|
||||
@@ -166,7 +167,7 @@ in
|
||||
phpPackage = instanceOpts.phpPackage;
|
||||
phpEnv."PATH" = pkgs.lib.makeBinPath [ instanceOpts.phpPackage ];
|
||||
}
|
||||
) cfg.instances;
|
||||
) (lib.filterAttrs (name: opts: opts.enablePhp) cfg.instances);
|
||||
|
||||
};
|
||||
|
||||
@@ -216,7 +217,7 @@ in
|
||||
'';
|
||||
|
||||
# Cache Media: images, icons, video, audio, HTC
|
||||
"~* \\.(?:jpg|jpeg|gif|png|webp|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|woff2)$".extraConfig = ''
|
||||
"~* \\.(?:css|js|jpg|jpeg|gif|png|webp|avif|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|woff2)$".extraConfig = ''
|
||||
expires 1y;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
@@ -228,19 +229,12 @@ in
|
||||
add_header Cache-Control "public";
|
||||
'';
|
||||
|
||||
# Cache CSS, Javascript, Images, Icons, Video, Audio, HTC, Fonts
|
||||
"~* \\.(?:css|js|jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|woff2)$".extraConfig = ''
|
||||
expires 1y;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
'';
|
||||
|
||||
"/".extraConfig = ''
|
||||
index index.php index.html;
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
'';
|
||||
})
|
||||
{
|
||||
(mkIf instanceOpts.enablePhp {
|
||||
"~ [^/]\\.php(/|$)".extraConfig = ''
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
if (!-f $document_root$fastcgi_script_name) {
|
||||
@@ -256,7 +250,7 @@ in
|
||||
fastcgi_pass unix:${config.services.phpfpm.pools."${domain}".socket};
|
||||
fastcgi_index index.php;
|
||||
'';
|
||||
}
|
||||
})
|
||||
];
|
||||
|
||||
extraConfig = instanceOpts.extraConfig;
|
||||
|
||||
@@ -5,6 +5,8 @@ let
|
||||
in {
|
||||
|
||||
services.webstack.instances."${domain}" = {
|
||||
enablePhp = false;
|
||||
|
||||
authorizedKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOXKR0AQdP1zn6pL2yjGA/eo9F5Ah2u6+Y5dIk8wR5/I"
|
||||
];
|
||||
@@ -67,7 +69,5 @@ in {
|
||||
add_header Pragma "public";
|
||||
add_header Cache-Control "public";
|
||||
'';
|
||||
|
||||
phpPackage = pkgs.php;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ let
|
||||
in {
|
||||
|
||||
services.webstack.instances."${domain}" = {
|
||||
enablePhp = false;
|
||||
|
||||
authorizedKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINrxGbJ8vqOLMySIst+e2Qq06bPLPh+7fmPRM27kMBgC"
|
||||
];
|
||||
@@ -67,7 +69,5 @@ in {
|
||||
add_header Pragma "public";
|
||||
add_header Cache-Control "public";
|
||||
'';
|
||||
|
||||
phpPackage = pkgs.php;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user