Luke Granger-Brown
6522ddba8c
sapi sapi sapi http://totoro:11316/sam?text=OLE%20Apartments%20are%20Very%20Complicated%20and%20cannot%20be%20understood%20by%20Mere%20Mortals.
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
# SPDX-FileCopyrightText: 2024 Luke Granger-Brown <depot@lukegb.com>
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
{ depot, pkgs, ... }:
|
|
|
|
{
|
|
systemd.targets.barf = {
|
|
wantedBy = [ "multi-user.target" ];
|
|
};
|
|
systemd.services.barf-sapid = {
|
|
wantedBy = [ "barf.target" ];
|
|
serviceConfig = {
|
|
ExecStart = "${depot.web.barf.sapi.sapid-wrapper}/bin/sapid-wrapper";
|
|
CacheDirectory = "barf-sapid";
|
|
User = "barf-sapid";
|
|
KillMode = "mixed";
|
|
PrivateTmp = true;
|
|
PrivateDevices = true;
|
|
RestrictNamespaces = true;
|
|
RestrictRealtime = true;
|
|
ProtectKernelLogs = true;
|
|
ProtectControlGroups = true;
|
|
ProtectHostname = true;
|
|
ProtectHome = true;
|
|
ProtectProc = "invisible";
|
|
ProcSubset = "pid";
|
|
ProtectKernelTunables = true;
|
|
ProtectKernelModules = true;
|
|
ProtectClock = true;
|
|
CapabilityBoundingSet = "";
|
|
LockPersonality = true;
|
|
PrivateUsers = true;
|
|
RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6 AF_NETLINK";
|
|
|
|
DynamicUser = true;
|
|
Restart = "always";
|
|
};
|
|
};
|
|
}
|