summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/ps4srv.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2022-03-02 16:22:14 +0100
committermakefu <github@syntax-fehler.de>2022-03-02 16:22:14 +0100
commit81817007edda4601c95a8f95aa99ce15320e224a (patch)
tree0e3998c1af71e785b8dd98dd371e4e72328734bb /makefu/2configs/home/ps4srv.nix
parenta2d2a6977e5d0809ee45590bc1e6faf705dfaee2 (diff)
ma home: init ps4srv
Diffstat (limited to 'makefu/2configs/home/ps4srv.nix')
-rw-r--r--makefu/2configs/home/ps4srv.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/makefu/2configs/home/ps4srv.nix b/makefu/2configs/home/ps4srv.nix
new file mode 100644
index 000000000..cb1864fae
--- /dev/null
+++ b/makefu/2configs/home/ps4srv.nix
@@ -0,0 +1,17 @@
+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;
+ }
+ '';
+ };
+}