ftp: format
This commit is contained in:
parent
e61e184925
commit
1373d78569
|
@ -28,45 +28,44 @@
|
|||
services.nginx = {
|
||||
enable = true;
|
||||
additionalModules = [ pkgs.nginxModules.fancyindex ];
|
||||
};
|
||||
virtualHosts."ftp.c3d2.de" =
|
||||
let
|
||||
theme = pkgs.fetchFromGitHub {
|
||||
owner = "barrowclift";
|
||||
repo = "directory-theme";
|
||||
rev = "fca275a3ab1d64e8cdbff7e4d2e1d44eec924e2e";
|
||||
sha256 = "sha256-UCQbQ+tyzR/Dpa0t2cogjzBJE+IJ9KAD2dtmq3gbq/U=";
|
||||
};
|
||||
in
|
||||
{
|
||||
default = true;
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
||||
services.nginx.virtualHosts."ftp.c3d2.de" =
|
||||
let
|
||||
theme = pkgs.fetchFromGitHub {
|
||||
owner = "barrowclift";
|
||||
repo = "directory-theme";
|
||||
rev = "fca275a3ab1d64e8cdbff7e4d2e1d44eec924e2e";
|
||||
sha256 = "sha256-UCQbQ+tyzR/Dpa0t2cogjzBJE+IJ9KAD2dtmq3gbq/U=";
|
||||
};
|
||||
in
|
||||
{
|
||||
default = true;
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/.theme/" = {
|
||||
alias = "${theme}/";
|
||||
};
|
||||
|
||||
locations."/.theme/" = {
|
||||
alias = "${theme}/";
|
||||
};
|
||||
locations."/" = {
|
||||
root = "/var/www/ftp.c3d2.de";
|
||||
extraConfig = ''
|
||||
charset UTF-8; # fix mojibake
|
||||
|
||||
locations."/" = {
|
||||
root = "/var/www/ftp.c3d2.de";
|
||||
extraConfig = ''
|
||||
charset UTF-8; # fix mojibake
|
||||
|
||||
fancyindex on;
|
||||
fancyindex_exact_size off;
|
||||
fancyindex_css_href /.theme/style.css;
|
||||
'';
|
||||
};
|
||||
fancyindex on;
|
||||
fancyindex_exact_size off;
|
||||
fancyindex_css_href /.theme/style.css;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh.extraConfig = ''
|
||||
Match User ftpupload
|
||||
X11Forwarding no
|
||||
ChrootDirectory /var/www/ftp.c3d2.de
|
||||
AllowTcpForwarding no
|
||||
ForceCommand internal-sftp
|
||||
'';
|
||||
Match User ftpupload
|
||||
X11Forwarding no
|
||||
ChrootDirectory /var/www/ftp.c3d2.de
|
||||
AllowTcpForwarding no
|
||||
ForceCommand internal-sftp
|
||||
'';
|
||||
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
|
|
Loading…
Reference in New Issue