mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 17:03:55 -05:00
mauville: added binary cache
This commit is contained in:
parent
1ebc670f2b
commit
2c93a2c5b9
9
modules/homelab/binary_cache.nix
Normal file
9
modules/homelab/binary_cache.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.nix-serve = {
|
||||||
|
enable = true;
|
||||||
|
secretKeyFile = "/var/cache-priv-key.pem";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
Reference in a new issue