nixos-config/2configs/home/ps4srv.nix
2022-03-02 16:22:14 +01:00

18 lines
305 B
Nix

let
internal-ip = "192.168.111.11";
in
{
services.nginx.virtualHosts."ps4srv" = {
serverAliases = [
"ps4srv.lan"
];
locations."/".root = "/media/cryptX/emu/ps4";
extraConfig = ''
if ( $server_addr != "${internal-ip}" ) {
return 403;
}
'';
};
}