summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/airsonic.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2021-03-12 20:10:27 +0100
committermakefu <github@syntax-fehler.de>2021-03-12 20:10:39 +0100
commitba614307cdc027dddd9aee2fecdaac86336957eb (patch)
treebda38bc2a0e4099511d63a05ed855807193f12b5 /makefu/2configs/home/airsonic.nix
parent27e182f7f878721c665b92b287e0d5f8da5bd06a (diff)
ma omo.r: deploy airsonic,photoprism,metube
Diffstat (limited to 'makefu/2configs/home/airsonic.nix')
-rw-r--r--makefu/2configs/home/airsonic.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/makefu/2configs/home/airsonic.nix b/makefu/2configs/home/airsonic.nix
new file mode 100644
index 000000000..15e77438d
--- /dev/null
+++ b/makefu/2configs/home/airsonic.nix
@@ -0,0 +1,29 @@
+{ config, ... }:
+let
+ internal-ip = "192.168.1.11";
+ port = 4040;
+in
+{
+ # networking.firewall.allowedTCPPorts = [ 4040 ];
+ services.airsonic = {
+ enable = true;
+ listenAddress = "0.0.0.0";
+ inherit port;
+ };
+ state = [ config.services.airsonic.home ];
+ services.nginx.virtualHosts."airsonic" = {
+ serverAliases = [
+ "airsonic.lan"
+ "music" "music.lan"
+ "musik" "musik.lan"
+ ];
+
+ locations."/".proxyPass = "http://localhost:${toString port}";
+ locations."/".proxyWebsockets = true;
+ extraConfig = ''
+ if ( $server_addr != "${internal-ip}" ) {
+ return 403;
+ }
+ '';
+ };
+}