add archivebox
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
../profiles/calibre
|
||||
../profiles/wallabag
|
||||
../profiles/finance
|
||||
../profiles/archivebox
|
||||
];
|
||||
|
||||
# For some reason this doesn't work in the profile, but does over here??
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
mossnet.backup = {
|
||||
enable = true;
|
||||
name = "curve";
|
||||
paths = [ "/home/anish" ];
|
||||
paths = [ "/home/anish/usr" ];
|
||||
};
|
||||
|
||||
# enable adb
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
{ config, options, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
# cfg = config.services.archivebox;
|
||||
dataDir = "/var/lib/archivebox";
|
||||
user = "archivebox";
|
||||
port = "8123";
|
||||
in
|
||||
{
|
||||
systemd.services.archivebox-install = {
|
||||
description = "archivebox install service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = with pkgs; [ coreutils archivebox ];
|
||||
|
||||
serviceConfig = {
|
||||
User = user;
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = "yes";
|
||||
PermissionsStartOnly = true;
|
||||
};
|
||||
|
||||
preStart = ''
|
||||
mkdir -p "${dataDir}"
|
||||
chown ${user} "${dataDir}"
|
||||
'';
|
||||
|
||||
script = ''
|
||||
echo "Setting up wallabag files in ${dataDir} ..."
|
||||
cd "${dataDir}"
|
||||
|
||||
archivebox init
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.archivebox-server = {
|
||||
description = "archivebox server service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = with pkgs; [ coreutils archivebox ];
|
||||
|
||||
serviceConfig = {
|
||||
User = user;
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = "yes";
|
||||
PermissionsStartOnly = true;
|
||||
};
|
||||
|
||||
preStart = ''
|
||||
mkdir -p "${dataDir}"
|
||||
chown ${user} "${dataDir}"
|
||||
'';
|
||||
|
||||
script = ''
|
||||
echo "Setting up wallabag files in ${dataDir} ..."
|
||||
cd "${dataDir}"
|
||||
|
||||
archivebox server 0.0.0.0:${port}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user