mauville: added binary cache

This commit is contained in:
Aly Raffauf 2024-03-20 18:14:21 -04:00
parent 1ebc670f2b
commit 2c93a2c5b9
3 changed files with 44 additions and 39 deletions

View file

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
services.nix-serve = {
enable = true;
secretKeyFile = "/var/cache-priv-key.pem";
};
}

View file

@ -2,11 +2,12 @@
{ {
imports = [ imports = [
./binary_cache.nix
./nginx_proxy.nix ./nginx_proxy.nix
./nix_containers.nix
./oci_containers.nix ./oci_containers.nix
./samba.nix ./samba.nix
./virtualization.nix ./virtualization.nix
./nix_containers.nix
]; ];
# services.ddclient.enable = true; # services.ddclient.enable = true;

View file

@ -14,8 +14,9 @@
# So we have to use this workaround. # So we have to use this workaround.
extraHosts = '' extraHosts = ''
127.0.0.1 music.raffauflabs.com 127.0.0.1 music.raffauflabs.com
127.0.0.1 podcasts.raffauflabs.com 127.0.0.1 nixcache.raffauflabs.com
127.0.0.1 plex.raffauflabs.com 127.0.0.1 plex.raffauflabs.com
127.0.0.1 podcasts.raffauflabs.com
''; '';
}; };
@ -28,21 +29,37 @@
recommendedProxySettings = true; recommendedProxySettings = true;
recommendedTlsSettings = true; recommendedTlsSettings = true;
recommendedGzipSettings = true; recommendedGzipSettings = true;
# other Nginx options
# virtualHosts."raffauflabs.com" = { virtualHosts."music.raffauflabs.com" = {
# enableACME = true; enableACME = true;
# forceSSL = true; forceSSL = true;
# locations."/" = { locations."/" = {
# proxyPass = "http://127.0.0.1:12345"; proxyPass = "http://127.0.0.1:4533";
# proxyWebsockets = true; # needed if you need to use WebSocket proxyWebsockets = true; # needed if you need to use WebSocket
# extraConfig = '' extraConfig = ''
# # required when the target is also TLS server with multiple hosts proxy_buffering off;
# proxy_ssl_server_name on; '';
# # required when the server wants to use HTTP Authentication };
# proxy_pass_header Authorization; };
# '';
# }; virtualHosts."nixcache.raffauflabs.com" = {
# }; enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
};
virtualHosts."plex.raffauflabs.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:32400";
proxyWebsockets = true; # needed if you need to use WebSocket
extraConfig = ''
proxy_buffering off;
'';
};
};
virtualHosts."podcasts.raffauflabs.com" = { virtualHosts."podcasts.raffauflabs.com" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
@ -61,27 +78,5 @@
''; '';
}; };
}; };
virtualHosts."plex.raffauflabs.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:32400";
proxyWebsockets = true; # needed if you need to use WebSocket
extraConfig = ''
proxy_buffering off;
'';
};
};
virtualHosts."music.raffauflabs.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:4533";
proxyWebsockets = true; # needed if you need to use WebSocket
extraConfig = ''
proxy_buffering off;
'';
};
};
}; };
} }