summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/airsonic.nix
diff options
context:
space:
mode:
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;
+ }
+ '';
+ };
+}