commit 9513b68bea0a1f612289bf5293019d9f6402beb1
parent 786765135c37a832a81e81c7e4efdc7e1efb5cc2
Author: mtmn <miro@haravara.org>
Date: Sun, 5 Jul 2026 21:22:40 +0200
furion: install seaweedfs
Diffstat:
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/hosts/furion/configuration.nix b/hosts/furion/configuration.nix
Binary files differ.
diff --git a/modules/services/seaweedfs.nix b/modules/services/seaweedfs.nix
@@ -2,7 +2,6 @@
config,
lib,
pkgs,
- haravara,
...
}: let
cfg = config.services.haravara.seaweedfs;
@@ -17,6 +16,16 @@ in {
type = lib.types.str;
description = "Base directory for SeaweedFS data";
};
+ s3BindAddress = lib.mkOption {
+ type = lib.types.str;
+ default = "0.0.0.0";
+ description = "Address for the S3 gateway";
+ };
+ s3AllowedIPs = lib.mkOption {
+ type = lib.types.listOf lib.types.str;
+ default = ["127.0.0.1" "::1" "10.88.0.0/16"];
+ description = "IPs/networks allowed to connect to the S3 gateway";
+ };
};
config = lib.mkIf cfg.enable {
@@ -87,9 +96,9 @@ in {
serviceConfig = {
User = "seaweedfs";
Group = "seaweedfs";
- ExecStart = "${pkgs.seaweedfs}/bin/weed s3 -port=8333 -ip.bind=0.0.0.0 -filer=127.0.0.1:8888 -metricsPort=9327";
+ ExecStart = "${pkgs.seaweedfs}/bin/weed s3 -port=8333 -ip.bind=${cfg.s3BindAddress} -filer=127.0.0.1:8888 -metricsPort=9327";
Restart = "always";
- IPAddressAllow = ["127.0.0.1" "::1" "10.88.0.0/16"];
+ IPAddressAllow = cfg.s3AllowedIPs;
IPAddressDeny = "any";
};
};
@@ -111,14 +120,5 @@ in {
};
};
};
-
- services.caddy.virtualHosts = lib.listToAttrs (map (domain: {
- name = domain;
- value.extraConfig = ''
- reverse_proxy 127.0.0.1:8333
- redir / https://${haravara.stripSubdomain domain}
- '';
- })
- cfg.domains);
};
}