nixos-config/machines/fuuko/services/media.nix
Simon Bruder 10b8d432d5
Relicense
This applies the REUSE specification to the repository, so the licensing
information can be tracked for every file individually.
2024-01-13 14:39:22 +01:00

28 lines
727 B
Nix

# SPDX-FileCopyrightText: 2021-2022 Simon Bruder <simon@sbruder.de>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
{ config, ... }:
{
sops.secrets.media-htpasswd.owner = "nginx";
services.nginx.virtualHosts."media.sbruder.de" = {
basicAuthFile = config.sops.secrets.media-htpasswd.path;
root = "/data/media/";
};
services.nginx-interactive-index.virtualHosts."media.sbruder.de".locations."/".enable = true;
users.users.media = {
home = "/data/media";
isSystemUser = true;
group = "media";
openssh.authorizedKeys.keys = [
"restrict,command=\"internal-sftp\" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMt91kAEA7ezIdve/64sv1kV4sd50ayzM09f5s5uOD+V"
];
};
users.groups.media = { };
}