From 943f15d4b76e13c19ac08a298bc12f7b6f14b931 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Wed, 12 May 2021 11:22:44 +0300 Subject: [PATCH] nixos/mastodon: add new sandboxing options --- nixos/modules/services/web-apps/mastodon.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/services/web-apps/mastodon.nix b/nixos/modules/services/web-apps/mastodon.nix index 2458cb3b5942..7c148ee76e4d 100644 --- a/nixos/modules/services/web-apps/mastodon.nix +++ b/nixos/modules/services/web-apps/mastodon.nix @@ -50,6 +50,9 @@ let # Logs directory and mode LogsDirectory = "mastodon"; LogsDirectoryMode = "0750"; + # Proc filesystem + ProcSubset = "pid"; + ProtectProc = "invisible"; # Access write directories UMask = "0027"; # Capabilities @@ -74,6 +77,7 @@ let MemoryDenyWriteExecute = false; RestrictRealtime = true; RestrictSUIDSGID = true; + RemoveIPC = true; PrivateMounts = true; # System Call Filtering SystemCallArchitectures = "native";