Skip to content

Commit

Permalink
nixos/parsoid: enable systemd sandboxing
Browse files Browse the repository at this point in the history
  • Loading branch information
mmilata committed Feb 25, 2020
1 parent 3b27f4d commit 9b0a957
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion nixos/modules/services/misc/parsoid.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,29 @@ in
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
User = "nobody";
ExecStart = "${parsoid}/lib/node_modules/parsoid/bin/server.js -c ${confFile} -n ${toString cfg.workers}";

DynamicUser = true;
User = "parsoid";
Group = "parsoid";

CapabilityBoundingSet = "";
NoNewPrivileges = true;
ProtectSystem = "strict";
ProtectHome = true;
PrivateTmp = true;
PrivateDevices = true;
ProtectHostname = true;
ProtectKernelTunables = true;
ProtectKernelModules = true;
ProtectControlGroups = true;
RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ];
RestrictNamespaces = true;
LockPersonality = true;
#MemoryDenyWriteExecute = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
RemoveIPC = true;
};
};

Expand Down

0 comments on commit 9b0a957

Please sign in to comment.