41 lines
1.2 KiB
Nix
41 lines
1.2 KiB
Nix
|
{ depot, config, lib, ... }:
|
||
|
let
|
||
|
cfg = config.services.lightspeed.ingest;
|
||
|
inherit (lib) mkOption types mkEnableOption;
|
||
|
in
|
||
|
{
|
||
|
options.services.lightspeed.ingest = {
|
||
|
enable = mkEnableOption "Lightspeed Ingest server (FTL->RTP)";
|
||
|
};
|
||
|
|
||
|
config = lib.mkIf cfg.enable {
|
||
|
systemd.services.lightspeed-ingest = {
|
||
|
after = [ "network.target" ];
|
||
|
wantedBy = [ "multi-user.target" ];
|
||
|
serviceConfig = {
|
||
|
ExecStart = "${depot.pkgs.lightspeed-ingest}/bin/lightspeed-ingest";
|
||
|
DynamicUser = true;
|
||
|
ProtectSystem = "strict";
|
||
|
CapabilityBoundingSet = "";
|
||
|
RestrictAddressFamilies = "AF_INET AF_INET6";
|
||
|
RestrictNamespaces = true;
|
||
|
PrivateDevices = true;
|
||
|
PrivateUsers = true;
|
||
|
ProtectClock = true;
|
||
|
ProtectControlGroups = true;
|
||
|
ProtectHome = "tmpfs";
|
||
|
ProtectKernelLogs = true;
|
||
|
ProtectKernelModules = true;
|
||
|
ProtectKernelTunables = true;
|
||
|
ProtectProc = "noaccess";
|
||
|
SystemCallArchitectures = "native";
|
||
|
RestrictRealtime = true;
|
||
|
LockPersonality = true;
|
||
|
MemoryDenyWriteExecute = true;
|
||
|
UMask = "0077";
|
||
|
ProtectHostname = true;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|