Merge pull request #313794 from tcmal/akkoma-3.13.2

akkoma: 3.13.1 -> 3.13.2
This commit is contained in:
Thomas Gerbet 2024-06-02 12:57:31 +02:00 committed by GitHub
commit e12faccb31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 9 deletions

View File

@ -119,7 +119,7 @@ let
-o ${escapeShellArg cfg.user } \
-g ${escapeShellArg cfg.group} \
<(hexdump -n 16 -e '"%02x"' /dev/urandom) \
"$RUNTIME_DIRECTORY/cookie"
"''${RUNTIME_DIRECTORY%%:*}/cookie"
'';
};
@ -131,7 +131,7 @@ let
-o ${escapeShellArg cfg.user} \
-g ${escapeShellArg cfg.group} \
${escapeShellArg cfg.dist.cookie._secret} \
"$RUNTIME_DIRECTORY/cookie"
"''${RUNTIME_DIRECTORY%%:*}/cookie"
'';
};
@ -181,7 +181,7 @@ let
name = "akkoma-config";
runtimeInputs = with pkgs; [ coreutils replace-secret ];
text = ''
cd "$RUNTIME_DIRECTORY"
cd "''${RUNTIME_DIRECTORY%%:*}"
tmp="$(mktemp config.exs.XXXXXXXXXX)"
trap 'rm -f "$tmp"' EXIT TERM
@ -279,7 +279,7 @@ let
cd "${cfg.package}"
RUNTIME_DIRECTORY="''${RUNTIME_DIRECTORY:-/run/akkoma}"
AKKOMA_CONFIG_PATH="$RUNTIME_DIRECTORY/config.exs" \
AKKOMA_CONFIG_PATH="''${RUNTIME_DIRECTORY%%:*}/config.exs" \
ERL_EPMD_ADDRESS="${cfg.dist.address}" \
ERL_EPMD_PORT="${toString cfg.dist.epmdPort}" \
ERL_FLAGS=${lib.escapeShellArg (lib.escapeShellArgs ([
@ -287,7 +287,7 @@ let
"-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_COOKIE="$(<"''${RUNTIME_DIRECTORY%%:*}/cookie")" \
RELEASE_NAME="akkoma" \
exec "${cfg.package}/bin/$(basename "$0")" "$@"
'';
@ -984,7 +984,7 @@ in {
RemainAfterExit = true;
UMask = "0077";
RuntimeDirectory = "akkoma";
RuntimeDirectory = mkBefore "akkoma";
ExecStart = mkMerge [
(mkIf (cfg.dist.cookie == null) [ genScript ])
@ -1072,7 +1072,7 @@ in {
ProtectProc = "noaccess";
ProcSubset = "pid";
ProtectSystem = mkIf (!isConfined) "strict";
ProtectSystem = "strict";
ProtectHome = true;
PrivateTmp = true;
PrivateDevices = true;

View File

@ -11,14 +11,14 @@
}:
beamPackages.mixRelease rec {
pname = "akkoma";
version = "3.13.1";
version = "3.13.2";
src = fetchFromGitea {
domain = "akkoma.dev";
owner = "AkkomaGang";
repo = "akkoma";
rev = "v${version}";
hash = "sha256-KRU7uEiwBimPz0HA+SClYt9/ubKNaRCArTGSiWvvVg8=";
hash = "sha256-WZAkpJIPzAbqXawNiM3JqE9tJzxrNs/2dGAWVMwLpN4=";
};
postPatch = ''