services/gallery-dl: update hardening options

This commit is contained in:
Gabriel Arazas 2022-04-29 16:55:09 +08:00
parent c9d497c3fc
commit cffc206eb4

View File

@ -73,7 +73,7 @@ in {
to be created at the time of running the service. to be created at the time of running the service.
''; '';
default = "/archives/gallery-dl-service"; default = "/archives/gallery-dl-service";
example = lib.literalExpression "/archiving-service/photos"; example = lib.literalExpression "/var/archives/gallery-dl-services";
}; };
settings = lib.mkOption { settings = lib.mkOption {
@ -153,12 +153,18 @@ in {
''; '';
startAt = value.startAt; startAt = value.startAt;
serviceConfig = { serviceConfig = {
LockPersonality = true;
NoNewPrivileges = true; NoNewPrivileges = true;
PrivateTmp = true; PrivateTmp = true;
PrivateUsers = true;
PrivateDevices = true;
ProtectControlGroups = true; ProtectControlGroups = true;
ProtectClock = true; ProtectClock = true;
ProtectKernelModules = true;
ProtectKernelLogs = true; ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
SystemCallFilter = "@system-service";
SystemCallErrorNumber = "EPERM";
}; };
}) cfg.jobs; }) cfg.jobs;
}; };