forked from lukas/nixos-config
20 lines
549 B
Nix
20 lines
549 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
systemd.tmpfiles.rules = [
|
|
"d /var/www/data/external 0755 drone users -"
|
|
];
|
|
|
|
systemd.services.data = {
|
|
description = "External static file server";
|
|
wantedBy = [ "multi-user.target" ];
|
|
before = [ "traefik.service" ];
|
|
serviceConfig = {
|
|
User = "drone";
|
|
Group = "users";
|
|
ExecStart = "${pkgs.static-web-server}/bin/static-web-server --host 127.0.0.1 --port 8011 --root /var/www/data/external --directory-listing true";
|
|
Restart = "always";
|
|
RestartSec = "5s";
|
|
};
|
|
};
|
|
}
|