hosts/storage-2: add firmware.clerie.de
This commit is contained in:
37
hosts/storage-2/firmware.nix
Normal file
37
hosts/storage-2/firmware.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
age.secrets.firmware-htpasswd = {
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
"firmware.clerie.de" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
alias = "/data/firmware/";
|
||||
basicAuthFile = config.age.secrets.firmware-htpasswd.path;
|
||||
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 - -"
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user