diff --git a/ops/nixos/lib/seaweedfs.nix b/ops/nixos/lib/seaweedfs.nix index b7a9991252..a653c30580 100644 --- a/ops/nixos/lib/seaweedfs.nix +++ b/ops/nixos/lib/seaweedfs.nix @@ -43,6 +43,12 @@ in { type = lib.types.package; }; + earlyOptions = lib.mkOption { + type = lib.types.submodule { + freeformType = commandLineType; + }; + default = {}; + }; options = lib.mkOption { type = lib.types.submodule { freeformType = commandLineType; @@ -76,6 +82,12 @@ in { type = lib.types.package; }; + earlyOptions = lib.mkOption { + type = lib.types.submodule { + freeformType = commandLineType; + }; + default = {}; + }; options = lib.mkOption { type = lib.types.submodule { freeformType = commandLineType; @@ -98,6 +110,12 @@ in { type = lib.types.package; }; + earlyOptions = lib.mkOption { + type = lib.types.submodule { + freeformType = commandLineType; + }; + default = {}; + }; options = lib.mkOption { type = lib.types.submodule { freeformType = commandLineType; @@ -160,7 +178,7 @@ in { (config.environment.etc."seaweedfs/replication.toml".source) ]; serviceConfig = { - ExecStart = "${cfg.filer.package}/bin/weed filer ${makeCommandLine cfg.filer.options}"; + ExecStart = "${cfg.filer.package}/bin/weed ${makeCommandLine cfg.filer.earlyOptions} filer ${makeCommandLine cfg.filer.options}"; User = "seaweedfs-filer"; Group = "seaweedfs"; DynamicUser = true; @@ -177,7 +195,7 @@ in { (config.environment.etc."seaweedfs/security.toml".source) ]; serviceConfig = { - ExecStart = "${cfg.master.package}/bin/weed master ${makeCommandLine cfg.master.options}"; + ExecStart = "${cfg.master.package}/bin/weed ${makeCommandLine cfg.master.earlyOptions} master ${makeCommandLine cfg.master.options}"; User = "seaweedfs-master"; Group = "seaweedfs"; DynamicUser = true; @@ -197,7 +215,7 @@ in { (config.environment.etc."seaweedfs/security.toml".source) ]; serviceConfig = { - ExecStart = "${cfg.volume.package}/bin/weed volume ${makeCommandLine cfg.volume.options}"; + ExecStart = "${cfg.volume.package}/bin/weed ${makeCommandLine cfg.volume.earlyOptions} volume ${makeCommandLine cfg.volume.options}"; User = "seaweedfs-volume"; Group = "seaweedfs"; DynamicUser = true;