nix-config/modules/file_sharing.nix

26 lines
561 B
Nix
Raw Normal View History

2022-05-09 16:50:23 +02:00
{ pkgs, lib, ... }: {
2022-05-06 20:26:49 +02:00
services = {
nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
"files.dvb.solutions" = {
enableACME = true;
2022-05-07 23:11:09 +02:00
onlySSL = true;
2022-05-06 21:56:41 +02:00
root = "/var/lib/data-accumulator/";
extraConfig = ''
autoindex on;
'';
2022-05-06 20:26:49 +02:00
};
};
2022-05-09 16:50:23 +02:00
};
cron = {
enable = true;
systemCronJobs = [
"0 0 0 * * cd /var/lib/data-accumulator/ && cp ./formatted.csv ./data/$(date +\"%d-%m-%Y\")-raw-data.csv"
];
2022-05-08 14:12:31 +02:00
2022-05-06 20:26:49 +02:00
};
2022-05-09 16:50:23 +02:00
};
2022-05-06 20:26:49 +02:00
}