add website
This commit is contained in:
68
hosts/web-arm/sites/feeds.jordanrannells.com.nix
Normal file
68
hosts/web-arm/sites/feeds.jordanrannells.com.nix
Normal file
@@ -0,0 +1,68 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
domain = "feeds.jordanrannells.com";
|
||||
dataDir = "/var/www/${domain}";
|
||||
in {
|
||||
|
||||
sops.secrets.nextcloud-smb-credentials-feeds = {
|
||||
owner = "feeds_cloonar_com";
|
||||
key = "nextcloud-smb-credentials";
|
||||
};
|
||||
fileSystems."${dataDir}/public" = {
|
||||
device = "//u149513.your-backup.de/u149513-sub4/Jordanellisrannells@gmail.com/files/Feeds/";
|
||||
fsType = "cifs";
|
||||
options = let
|
||||
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users,file_mode=0770,dir_mode=0770";
|
||||
in ["${automount_opts},credentials=${config.sops.secrets.nextcloud-smb-credentials-feeds.path},uid=1011,gid=60"];
|
||||
};
|
||||
|
||||
services.borgbackup.jobs.default.exclude = [
|
||||
"${dataDir}/public"
|
||||
];
|
||||
|
||||
|
||||
services.webstack.instances."${domain}" = {
|
||||
enableDefaultLocations = false;
|
||||
enableMysql = false;
|
||||
authorizedKeys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDDBGlzrg6NP5ezRFVu1CV8r0uCcS2oIgYG2/u6Cit++ARWQRO5Y0+9qC1Y2RNUaLPbvTmXg7ShskolUeuLryqvp10K2kXQ4E9NlmJ3BNLiAfWCzfe6gAgr6u5unVlXHttnP0leYpGGMUCKuiJpzy/bR6rMIUrCQC6W/MeXkwysNWKvL+ZD0IeQbogtfMFZmag9PO04RKZZvuUn9YvlgkTEK97g5dtyP1NxdtE9dDYf0G+0HcHITcw+lVmGNNwi43nAoUHieQd1kWc8YmxFB+y5O+vRH2O6pZBSdr0tdK6bPcezxd3Gk6i3a54yZfbvSislWA+o7s6uw/qExocpZb7xWa5ymPrGlEPbpYdT1y3hFO25+L1lR4QdG9oUNtJ974bL+EmYmHU+j32K3f8fxDg6BRo8FuriLtAzP7/2/7W8K4nIdMoosS+Ond2JE6XFkg1kSrXCivDBQoetZLO2y+ZPYcsQwIZsdjOnZqVr76nTepqCGIKYCuNM/9sl4AWCsyU="
|
||||
];
|
||||
extraConfig = ''
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
index index.php
|
||||
|
||||
charset utf-8;
|
||||
|
||||
error_page 404 /index.php;
|
||||
'';
|
||||
|
||||
locations = {
|
||||
"/favicon.ico".extraConfig = ''
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
'';
|
||||
"/robots.txt".extraConfig = ''
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
'';
|
||||
|
||||
"~ ^/[^/]+/".extraConfig = ''
|
||||
try_files $uri $uri/index.php /index.php;
|
||||
'';
|
||||
|
||||
# "/".extraConfig = ''
|
||||
# try_files $uri $uri/index.php;
|
||||
# '';
|
||||
#
|
||||
# "~ /$".extraConfig = ''
|
||||
# try_files $uri $uri/index.php /index.php;
|
||||
# '';
|
||||
};
|
||||
|
||||
phpPackage = pkgs.php82;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${domain}".acmeRoot = lib.mkForce "/var/lib/acme/acme-challenge";
|
||||
}
|
||||
Reference in New Issue
Block a user