From 153422f74b1ed5cae37c9424514a9e9d1f79acb4 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 11 Jul 2015 19:44:12 +0200 Subject: move old stuff --- modules/tv/nginx/config.nix | 49 --------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 modules/tv/nginx/config.nix (limited to 'modules/tv/nginx/config.nix') diff --git a/modules/tv/nginx/config.nix b/modules/tv/nginx/config.nix deleted file mode 100644 index 4bfd8ad..0000000 --- a/modules/tv/nginx/config.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ cfg, config, lib, pkgs, ... }: - -let - inherit (lib) concatStrings replaceChars; - - indent = replaceChars ["\n"] ["\n "]; - - to-location = { name, value }: '' - location ${name} { - ${indent value} - } - ''; -in - -{ - services.nginx = - let - name = config.tv.retiolum.name; - qname = "${name}.retiolum"; - in - assert config.tv.retiolum.enable; - { - enable = true; - httpConfig = '' - include ${pkgs.nginx}/conf/mime.types; - default_type application/octet-stream; - sendfile on; - keepalive_timeout 65; - gzip on; - server { - listen 80 default_server; - server_name _; - location / { - return 404; - } - } - server { - listen 80; - server_name ${name} ${qname}; - - ${indent (concatStrings (map to-location cfg.retiolum-locations))} - - location / { - return 404; - } - } - ''; - }; -} -- cgit v1.2.3