Setup minio properly
This commit is contained in:
@@ -9,8 +9,6 @@ let
|
|||||||
|
|
||||||
adblockUpdate = pkgs.writeShellScriptBin "adblockUpdate" (builtins.readFile ./adblockUpdate.sh);
|
adblockUpdate = pkgs.writeShellScriptBin "adblockUpdate" (builtins.readFile ./adblockUpdate.sh);
|
||||||
proxyPort = 3128;
|
proxyPort = 3128;
|
||||||
minioPort = 9000;
|
|
||||||
minioConsolePort = 9001;
|
|
||||||
dnsPort = 53;
|
dnsPort = 53;
|
||||||
dhcpPort = 67;
|
dhcpPort = 67;
|
||||||
dnsServers = [
|
dnsServers = [
|
||||||
@@ -62,8 +60,6 @@ in {
|
|||||||
];
|
];
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
dnsPort
|
dnsPort
|
||||||
minioPort
|
|
||||||
minioConsolePort
|
|
||||||
proxyPort
|
proxyPort
|
||||||
80
|
80
|
||||||
];
|
];
|
||||||
@@ -191,15 +187,7 @@ in {
|
|||||||
"jellyfin.home".target = "http://localhost:8096/";
|
"jellyfin.home".target = "http://localhost:8096/";
|
||||||
};
|
};
|
||||||
|
|
||||||
age.secrets.minio.file = ../../secrets/minio.age;
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
minio = {
|
|
||||||
enable = true;
|
|
||||||
dataDir = [ "/proxy/minio" ];
|
|
||||||
rootCredentialsFile = config.age.secrets.minio.path;
|
|
||||||
browser = true;
|
|
||||||
};
|
|
||||||
nginx.virtualHosts."nixcache.thehellings.lan" = {
|
nginx.virtualHosts."nixcache.thehellings.lan" = {
|
||||||
serverName = "nixcache.thehellings.lan";
|
serverName = "nixcache.thehellings.lan";
|
||||||
serverAliases = [ "nixcache" "nixcache.home" ];
|
serverAliases = [ "nixcache" "nixcache.home" ];
|
||||||
@@ -238,7 +226,6 @@ 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
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ in
|
|||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
./minio.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
@@ -66,8 +67,6 @@ in
|
|||||||
registrationConfigFile = config.age.secrets.runner-reg.path;
|
registrationConfigFile = config.age.secrets.runner-reg.path;
|
||||||
environmentVariables = {
|
environmentVariables = {
|
||||||
EFI_DIR = "${pkgs.OVMF.fd}/FV/";
|
EFI_DIR = "${pkgs.OVMF.fd}/FV/";
|
||||||
#HTTP_PROXY = "http://10.42.1.4:3128/";
|
|
||||||
#HTTPS_PROXY = "http://10.42.1.4:3128/";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
minioPort = 9000;
|
||||||
|
minioConsolePort = 9001;
|
||||||
|
in {
|
||||||
|
fileSystems."/proxy" = {
|
||||||
|
device = "/dev/sda1";
|
||||||
|
fsType = "btrfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
minioPort
|
||||||
|
minioConsolePort
|
||||||
|
];
|
||||||
|
|
||||||
|
age.secrets.minio.file = ../../secrets/minio.age;
|
||||||
|
|
||||||
|
services.minio = {
|
||||||
|
enable = true;
|
||||||
|
dataDir = [ "/proxy/minio" ];
|
||||||
|
rootCredentialsFile = config.age.secrets.minio.path;
|
||||||
|
browser = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
minio-client
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user