2024-03-02 16:28:45 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
2024-05-02 13:10:17 +02:00
|
|
|
sops.secrets.firmware-htpasswd = {
|
2024-03-02 16:28:45 +01:00
|
|
|
owner = "nginx";
|
|
|
|
group = "nginx";
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts = {
|
|
|
|
"firmware.clerie.de" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
locations."/" = {
|
|
|
|
alias = "/data/firmware/";
|
2024-05-02 13:10:17 +02:00
|
|
|
basicAuthFile = config.sops.secrets.firmware-htpasswd.path;
|
2024-03-02 16:28:45 +01:00
|
|
|
extraConfig = ''
|
|
|
|
autoindex on;
|
|
|
|
autoindex_exact_size off;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
users.users.data-firmware = {
|
|
|
|
group = "data-firmware";
|
|
|
|
home = "/data/firmware";
|
|
|
|
useDefaultShell = true;
|
|
|
|
isSystemUser = true;
|
|
|
|
};
|
|
|
|
users.groups.data-firmware = {};
|
|
|
|
|
|
|
|
systemd.tmpfiles.rules = [
|
|
|
|
"d /data/firmware - data-firmware data-firmware - -"
|
|
|
|
];
|
|
|
|
}
|