services/archivebox: remove archivePath option

It is quite limiting to what workflow it allows. Though, this iteration
now enforces it to be in `/var/lib/archivebox`, setting an arbitrary
option is less desirable.
This commit is contained in:
Gabriel Arazas 2023-11-07 20:38:00 +08:00
parent e9d55ab771
commit 534a300768
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -74,7 +74,8 @@ let
ProtectKernelTunables = true; ProtectKernelTunables = true;
SystemCallFilter = "@system-service"; SystemCallFilter = "@system-service";
SystemCallErrorNumber = "EPERM"; SystemCallErrorNumber = "EPERM";
WorkingDirectory = cfg.archivePath;
StateDirectory = "archivebox";
}; };
}; };
@ -96,14 +97,6 @@ in
options.services.archivebox = { options.services.archivebox = {
enable = lib.mkEnableOption "Archivebox service"; enable = lib.mkEnableOption "Archivebox service";
archivePath = lib.mkOption {
type = with lib.types; either path str;
description = ''
The path of the Archivebox archive. Must be an absolute path.
'';
example = "/var/archives/archivebox-service";
};
jobs = lib.mkOption { jobs = lib.mkOption {
type = with lib.types; attrsOf (submodule jobType); type = with lib.types; attrsOf (submodule jobType);
description = "A map of archiving tasks for the service."; description = "A map of archiving tasks for the service.";
@ -175,7 +168,7 @@ in
ProtectKernelTunables = true; ProtectKernelTunables = true;
SystemCallFilter = "@system-service"; SystemCallFilter = "@system-service";
SystemCallErrorNumber = "EPERM"; SystemCallErrorNumber = "EPERM";
WorkingDirectory = cfg.archivePath; StateDirectory = "archivebox";
}; };
}; };
}) })