mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 06:19:00 +00:00
tests/modules/home-manager: init services.archivebox
This commit is contained in:
parent
a42c588402
commit
e3a14a4453
@ -56,6 +56,7 @@ import nmt {
|
||||
./programs/pop-launcher
|
||||
]
|
||||
++ lib.optionals isLinux [
|
||||
./services/archivebox
|
||||
./services/matcha
|
||||
./services/plover
|
||||
./services/yt-dlp
|
||||
|
23
tests/modules/home-manager/services/archivebox/basic-job.nix
Normal file
23
tests/modules/home-manager/services/archivebox/basic-job.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.archivebox = {
|
||||
enable = true;
|
||||
archivePath = "${config.xdg.userDirs.documents}/ArchiveBox";
|
||||
|
||||
jobs.art = {
|
||||
links = [
|
||||
"https://www.davidrevoy.com/"
|
||||
"https://www.youtube.com/c/ronillust"
|
||||
];
|
||||
startAt = "weekly";
|
||||
};
|
||||
};
|
||||
|
||||
test.stubs.archivebox = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/systemd/user/archivebox-job-art.service
|
||||
assertFileExists home-files/.config/systemd/user/archivebox-job-art.timer
|
||||
'';
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
archivebox-basic-job = ./basic-job.nix;
|
||||
archivebox-multiple-jobs = ./multiple-jobs.nix;
|
||||
archivebox-webserver = ./webserver.nix;
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.archivebox = {
|
||||
enable = true;
|
||||
archivePath = "${config.xdg.userDirs.documents}/ArchiveBox";
|
||||
|
||||
jobs = {
|
||||
art = {
|
||||
links = [
|
||||
"https://www.davidrevoy.com/"
|
||||
"https://www.youtube.com/c/ronillust"
|
||||
];
|
||||
startAt = "weekly";
|
||||
};
|
||||
|
||||
research = {
|
||||
links = [
|
||||
"https://arxiv.org/rss/cs"
|
||||
"https://distill.pub/"
|
||||
];
|
||||
extraArgs = [ "--depth" "1" ];
|
||||
startAt = "daily";
|
||||
};
|
||||
|
||||
tech = {
|
||||
links = [
|
||||
"https://thisweek.gnome.org/index.xml"
|
||||
"https://pointieststick.com/feed"
|
||||
"https://planet.gnome.org/atom.xml"
|
||||
"https://planet.kde.org/atom.xml"
|
||||
];
|
||||
startAt = "daily";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
test.stubs.archivebox = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/systemd/user/archivebox-job-art.service
|
||||
assertFileExists home-files/.config/systemd/user/archivebox-job-art.timer
|
||||
|
||||
assertFileExists home-files/.config/systemd/user/archivebox-job-research.service
|
||||
assertFileExists home-files/.config/systemd/user/archivebox-job-research.timer
|
||||
|
||||
assertFileExists home-files/.config/systemd/user/archivebox-job-tech.service
|
||||
assertFileExists home-files/.config/systemd/user/archivebox-job-tech.timer
|
||||
'';
|
||||
}
|
30
tests/modules/home-manager/services/archivebox/webserver.nix
Normal file
30
tests/modules/home-manager/services/archivebox/webserver.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.archivebox = {
|
||||
enable = true;
|
||||
archivePath = "${config.xdg.userDirs.documents}/ArchiveBox";
|
||||
|
||||
jobs.art = {
|
||||
links = [
|
||||
"https://www.davidrevoy.com/"
|
||||
"https://www.youtube.com/c/ronillust"
|
||||
];
|
||||
startAt = "weekly";
|
||||
};
|
||||
|
||||
webserver = {
|
||||
enable = true;
|
||||
port = 8888;
|
||||
};
|
||||
};
|
||||
|
||||
test.stubs.archivebox = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/systemd/user/archivebox-job-art.service
|
||||
assertFileExists home-files/.config/systemd/user/archivebox-job-art.timer
|
||||
|
||||
assertFileExists home-files/.config/systemd/user/archivebox-server.service
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user