about summary refs log tree commit diff
path: root/nixos/modules/services/web-apps
diff options
context:
space:
mode:
authorchayleaf <chayleaf-git@pavluk.org>2023-10-20 17:28:45 +0700
committerchayleaf <chayleaf-git@pavluk.org>2023-10-20 17:34:14 +0700
commite2b6ff83847e2acf1e16cced9ecd54329bff013e (patch)
treeea254b8a6bcf7bf06f5f2f212ddce0635c6e6f7f /nixos/modules/services/web-apps
parent81e8f48ebdecf07aab321182011b067aafc78896 (diff)
downloadnixlib-e2b6ff83847e2acf1e16cced9ecd54329bff013e.tar
nixlib-e2b6ff83847e2acf1e16cced9ecd54329bff013e.tar.gz
nixlib-e2b6ff83847e2acf1e16cced9ecd54329bff013e.tar.bz2
nixlib-e2b6ff83847e2acf1e16cced9ecd54329bff013e.tar.lz
nixlib-e2b6ff83847e2acf1e16cced9ecd54329bff013e.tar.xz
nixlib-e2b6ff83847e2acf1e16cced9ecd54329bff013e.tar.zst
nixlib-e2b6ff83847e2acf1e16cced9ecd54329bff013e.zip
nixos/akkoma: add services.akkoma.dist.extraFlags
This allows configuring Erlang flags
Diffstat (limited to 'nixos/modules/services/web-apps')
-rw-r--r--nixos/modules/services/web-apps/akkoma.nix17
1 files changed, 12 insertions, 5 deletions
diff --git a/nixos/modules/services/web-apps/akkoma.nix b/nixos/modules/services/web-apps/akkoma.nix
index 8d1775258612..eaee70c712bb 100644
--- a/nixos/modules/services/web-apps/akkoma.nix
+++ b/nixos/modules/services/web-apps/akkoma.nix
@@ -282,11 +282,11 @@ let
         AKKOMA_CONFIG_PATH="$RUNTIME_DIRECTORY/config.exs" \
         ERL_EPMD_ADDRESS="${cfg.dist.address}" \
         ERL_EPMD_PORT="${toString cfg.dist.epmdPort}" \
-        ERL_FLAGS="${concatStringsSep " " [
-          "-kernel inet_dist_use_interface '${erlAddr cfg.dist.address}'"
-          "-kernel inet_dist_listen_min ${toString cfg.dist.portMin}"
-          "-kernel inet_dist_listen_max ${toString cfg.dist.portMax}"
-        ]}" \
+        ERL_FLAGS=${lib.escapeShellArg (lib.escapeShellArgs ([
+          "-kernel" "inet_dist_use_interface" (erlAddr cfg.dist.address)
+          "-kernel" "inet_dist_listen_min" (toString cfg.dist.portMin)
+          "-kernel" "inet_dist_listen_max" (toString cfg.dist.portMax)
+        ] ++ cfg.dist.extraFlags))} \
         RELEASE_COOKIE="$(<"$RUNTIME_DIRECTORY/cookie")" \
         RELEASE_NAME="akkoma" \
           exec "${cfg.package}/bin/$(basename "$0")" "$@"
@@ -553,6 +553,13 @@ in {
           description = mdDoc "TCP port to bind Erlang Port Mapper Daemon to.";
         };
 
+        extraFlags = mkOption {
+          type = with types; listOf str;
+          default = [ ];
+          description = mdDoc "Extra flags to pass to Erlang";
+          example = [ "+sbwt" "none" "+sbwtdcpu" "none" "+sbwtdio" "none" ];
+        };
+
         portMin = mkOption {
           type = types.port;
           default = 49152;