nginx more

This commit is contained in:
2025-10-30 14:35:54 +00:00
parent 72628b008b
commit 6edcffcaf0

View File

@@ -12,14 +12,23 @@
services.nginx = { services.nginx = {
enable = true; enable = true;
virtualHosts."go." = { defaultListenAddresses = [ "0.0.0.0" ];
listenAddresses = [ "127.0.0.1" ]; virtualHosts = {
addSSL = true; "_" = {
sslCertificate = "${../../shared/certs/go.pem}"; default = true;
sslCertificateKey = "${../../shared/certs/go.key}"; root = "/var/run/nginx/motiejus";
locations."/".extraConfig = '' locations."/".extraConfig = ''
return 301 https://golinks.io$request_uri; autoindex on;
''; '';
};
"go" = {
addSSL = true;
sslCertificate = "${../../shared/certs/go.pem}";
sslCertificateKey = "${../../shared/certs/go.key}";
locations."/".extraConfig = ''
return 301 https://golinks.io$request_uri;
'';
};
}; };
}; };
@@ -69,18 +78,23 @@
}; };
}; };
}; };
# TODO remove once 24.05 is out
systemd.services.clamav-daemon.serviceConfig = {
StateDirectory = "clamav";
RuntimeDirectory = "clamav";
User = "clamav";
Group = "clamav";
};
systemd.services.clamav-freshclam.serviceConfig = { systemd.services = {
StateDirectory = "clamav"; # TODO remove once 24.05 is out
User = "clamav"; clamav-daemon.serviceConfig = {
Group = "clamav"; StateDirectory = "clamav";
RuntimeDirectory = "clamav";
User = "clamav";
Group = "clamav";
};
clamav-freshclam.serviceConfig = {
StateDirectory = "clamav";
User = "clamav";
Group = "clamav";
};
nginx.serviceConfig.BindPaths = [ "/home/motiejus/www:/var/run/nginx/motiejus" ];
}; };
home-manager.users.${config.mj.username} = { home-manager.users.${config.mj.username} = {