summaryrefslogtreecommitdiffstats
path: root/modules/tv/nginx/config.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2015-07-11 19:44:12 +0200
committertv <tv@krebsco.de>2015-07-11 19:44:12 +0200
commit153422f74b1ed5cae37c9424514a9e9d1f79acb4 (patch)
tree94cd29e6a98f1ce6228104055d0550e318242290 /modules/tv/nginx/config.nix
parente21f45386d7aeb3dd3e9d828e1702115f4ef2bce (diff)
move old stuff
Diffstat (limited to 'modules/tv/nginx/config.nix')
-rw-r--r--modules/tv/nginx/config.nix49
1 files changed, 0 insertions, 49 deletions
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;
- }
- }
- '';
- };
-}