mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +00:00
services/archivebox: change jobs.<name>.links
to jobs.<name>.urls
This commit is contained in:
parent
8590f4ea32
commit
4dd2acfe7f
@ -4,7 +4,7 @@ let
|
|||||||
cfg = config.services.archivebox;
|
cfg = config.services.archivebox;
|
||||||
jobType = { name, options, ... }: {
|
jobType = { name, options, ... }: {
|
||||||
options = {
|
options = {
|
||||||
links = lib.mkOption {
|
urls = lib.mkOption {
|
||||||
type = with lib.types; listOf str;
|
type = with lib.types; listOf str;
|
||||||
description = "List of links to archive.";
|
description = "List of links to archive.";
|
||||||
example = lib.literalExpression ''
|
example = lib.literalExpression ''
|
||||||
@ -23,7 +23,7 @@ let
|
|||||||
'';
|
'';
|
||||||
default = [ ];
|
default = [ ];
|
||||||
example = lib.literalExpression ''
|
example = lib.literalExpression ''
|
||||||
[ "--depth 1" ]
|
[ "--depth" "1" ]
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ in {
|
|||||||
example = lib.literalExpression ''
|
example = lib.literalExpression ''
|
||||||
{
|
{
|
||||||
illustration = {
|
illustration = {
|
||||||
links = [
|
urls = [
|
||||||
"https://www.davidrevoy.com/"
|
"https://www.davidrevoy.com/"
|
||||||
"https://www.youtube.com/c/ronillust"
|
"https://www.youtube.com/c/ronillust"
|
||||||
];
|
];
|
||||||
@ -67,7 +67,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
research = {
|
research = {
|
||||||
links = [
|
urls = [
|
||||||
"https://arxiv.org/rss/cs"
|
"https://arxiv.org/rss/cs"
|
||||||
"https://distill.pub/"
|
"https://distill.pub/"
|
||||||
];
|
];
|
||||||
@ -110,7 +110,7 @@ in {
|
|||||||
mkdir -p ${lib.escapeShellArg cfg.archivePath}
|
mkdir -p ${lib.escapeShellArg cfg.archivePath}
|
||||||
'';
|
'';
|
||||||
script = ''
|
script = ''
|
||||||
echo "${lib.concatStringsSep "\n" value.links}" \
|
echo "${lib.concatStringsSep "\n" value.urls}" \
|
||||||
| archivebox add ${lib.concatStringsSep " " value.extraArgs}
|
| archivebox add ${lib.concatStringsSep " " value.extraArgs}
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
Loading…
Reference in New Issue
Block a user