summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-10-24 18:30:24 +0300
committerGitHub <noreply@github.com>2023-10-24 18:30:24 +0300
commitd0d6219c4299b505ee0b66bf68400c56edad8449 (patch)
tree89e81f731e412907e2b488b9a021a696dabf6cea /nixos
parenta175340898a8a886581065e6bfdeae82e5aa3ba7 (diff)
parente2b6ff83847e2acf1e16cced9ecd54329bff013e (diff)
downloadnixpkgs-d0d6219c4299b505ee0b66bf68400c56edad8449.tar
nixpkgs-d0d6219c4299b505ee0b66bf68400c56edad8449.tar.gz
nixpkgs-d0d6219c4299b505ee0b66bf68400c56edad8449.tar.bz2
nixpkgs-d0d6219c4299b505ee0b66bf68400c56edad8449.tar.lz
nixpkgs-d0d6219c4299b505ee0b66bf68400c56edad8449.tar.xz
nixpkgs-d0d6219c4299b505ee0b66bf68400c56edad8449.tar.zst
nixpkgs-d0d6219c4299b505ee0b66bf68400c56edad8449.zip
Merge pull request #262265 from chayleaf/akkoma-extra
nixos/akkoma: add services.akkoma.dist.extraFlags
Diffstat (limited to 'nixos')
-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 8d177525861..eaee70c712b 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;