summaryrefslogtreecommitdiff
path: root/hosts/flora
diff options
context:
space:
mode:
authorstuebinm2021-10-05 15:14:42 +0200
committerstuebinm2021-10-05 15:14:42 +0200
commitcbe5666097a0bf018eac0cf48ae6914db3bfe483 (patch)
treea0799ea552ec5173cd5138bba115ca29513ff852 /hosts/flora
parent22c6837abde39c5a75baeefa95908792867e42de (diff)
add docker registry
(used mostly to host a guix container that just contains the guix daemon and not much else, since no such think appears to exist elsewhere)
Diffstat (limited to 'hosts/flora')
-rw-r--r--hosts/flora/configuration.nix1
-rw-r--r--hosts/flora/services/dockerhub.nix23
2 files changed, 24 insertions, 0 deletions
diff --git a/hosts/flora/configuration.nix b/hosts/flora/configuration.nix
index d45175e..4b395db 100644
--- a/hosts/flora/configuration.nix
+++ b/hosts/flora/configuration.nix
@@ -10,6 +10,7 @@
./services/cgit.nix
./services/surveys.nix
#./services/picarones.nix
+ ./services/dockerhub.nix
];
# Use the GRUB 2 boot loader.
diff --git a/hosts/flora/services/dockerhub.nix b/hosts/flora/services/dockerhub.nix
new file mode 100644
index 0000000..c9b84b3
--- /dev/null
+++ b/hosts/flora/services/dockerhub.nix
@@ -0,0 +1,23 @@
+{ config, lib, pkgs, ... }:
+
+{
+ services.dockerRegistry = {
+ enable = true;
+ port = 6000;
+ enableRedisCache = false;
+ extraConfig = {
+ storage.maintenance.readonly.enabled = true;
+ };
+ };
+
+ services.nginx.virtualHosts."registry.stuebinm.eu" = {
+ locations."/" = {
+ proxyPass = "http://localhost:6000";
+ proxyWebsockets = true;
+ };
+ enableACME = true;
+ forceSSL = true;
+ };
+
+ services.nginx.clientMaxBodySize = "0";
+}