Move proxies to iSCSI
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
networking.hostName = "genesis"; # Define your hostname.
|
networking.hostName = "genesis"; # Define your hostname.
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
awscli2
|
awscli2
|
||||||
|
btrfs-progs
|
||||||
create_ssl
|
create_ssl
|
||||||
step-ca
|
step-ca
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ let
|
|||||||
|
|
||||||
adblockUpdate = pkgs.writeShellScriptBin "adblockUpdate" (builtins.readFile ./adblockUpdate.sh);
|
adblockUpdate = pkgs.writeShellScriptBin "adblockUpdate" (builtins.readFile ./adblockUpdate.sh);
|
||||||
proxyPort = 3128;
|
proxyPort = 3128;
|
||||||
|
minioPort = 9000;
|
||||||
dnsPort = 53;
|
dnsPort = 53;
|
||||||
dhcpPort = 67;
|
dhcpPort = 67;
|
||||||
dnsServers = [
|
dnsServers = [
|
||||||
@@ -86,6 +87,7 @@ in {
|
|||||||
];
|
];
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
dnsPort
|
dnsPort
|
||||||
|
minioPort
|
||||||
proxyPort
|
proxyPort
|
||||||
80
|
80
|
||||||
];
|
];
|
||||||
@@ -102,8 +104,8 @@ in {
|
|||||||
options = [ "ro" ];
|
options = [ "ro" ];
|
||||||
};
|
};
|
||||||
"/proxy" = {
|
"/proxy" = {
|
||||||
device = "10.42.1.4:/volume1/nixpkgs/";
|
device = "/dev/vdb1";
|
||||||
fsType = "nfs";
|
fsType = "btrfs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -219,6 +221,7 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
dataDir = [ "/proxy/minio" ];
|
dataDir = [ "/proxy/minio" ];
|
||||||
rootCredentialsFile = config.age.secrets.minio.path;
|
rootCredentialsFile = config.age.secrets.minio.path;
|
||||||
|
browser = false;
|
||||||
};
|
};
|
||||||
nginx.virtualHosts."nixcache.thehellings.lan" = {
|
nginx.virtualHosts."nixcache.thehellings.lan" = {
|
||||||
serverName = "nixcache.thehellings.lan";
|
serverName = "nixcache.thehellings.lan";
|
||||||
@@ -227,25 +230,25 @@ in {
|
|||||||
locations = {
|
locations = {
|
||||||
"~ ^/nix-cache-info" = {
|
"~ ^/nix-cache-info" = {
|
||||||
proxyPass = "https://cache.nixos.org";
|
proxyPass = "https://cache.nixos.org";
|
||||||
root = "/proxy/nix-cache-info/store";
|
root = "/proxy/nixpkgs/nix-cache-info/store";
|
||||||
recommendedProxySettings = false;
|
recommendedProxySettings = false;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
error_log /var/log/nginx/proxy.log debug;
|
error_log /var/log/nginx/proxy.log debug;
|
||||||
proxy_store on;
|
proxy_store on;
|
||||||
proxy_store_access user:rw group:rw all:r;
|
proxy_store_access user:rw group:rw all:r;
|
||||||
proxy_temp_path /proxy/nix-cache-info/temp;
|
proxy_temp_path /proxy/nixpkgs/nix-cache-info/temp;
|
||||||
proxy_pass_request_headers on;
|
proxy_pass_request_headers on;
|
||||||
proxy_set_header Host "cache.nixos.org";
|
proxy_set_header Host "cache.nixos.org";
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"~^/nar/.+$" = {
|
"~^/nar/.+$" = {
|
||||||
proxyPass = "https://cache.nixos.org";
|
proxyPass = "https://cache.nixos.org";
|
||||||
root = "/proxy/nar/store";
|
root = "/proxy/nixpkgs/nar/store";
|
||||||
recommendedProxySettings = false;
|
recommendedProxySettings = false;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
proxy_store on;
|
proxy_store on;
|
||||||
proxy_store_access user:rw group:rw all:r;
|
proxy_store_access user:rw group:rw all:r;
|
||||||
proxy_temp_path /proxy/nar/temp;
|
proxy_temp_path /proxy/nixpkgs/nar/temp;
|
||||||
proxy_pass_request_headers on;
|
proxy_pass_request_headers on;
|
||||||
proxy_set_header Host "cache.nixos.org";
|
proxy_set_header Host "cache.nixos.org";
|
||||||
'';
|
'';
|
||||||
@@ -258,6 +261,7 @@ in {
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
bind
|
bind
|
||||||
curl # Used by dnsmasq fetching
|
curl # Used by dnsmasq fetching
|
||||||
|
minio-client
|
||||||
sqlite
|
sqlite
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user