diff options
author | tv <tv@shackspace.de> | 2015-07-16 23:22:30 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2015-07-16 23:22:30 +0200 |
commit | 57c520b722f25f384301118046bf9cf182d4edd7 (patch) | |
tree | 57983c04bb49fe0375300861111a61cede545794 /old/modules/tv/nginx | |
parent | 447c63edbd403abf026800d10594ed037b4304e9 (diff) |
Goodbye old world, and thanks for all the fish!
Diffstat (limited to 'old/modules/tv/nginx')
-rw-r--r-- | old/modules/tv/nginx/config.nix | 49 | ||||
-rw-r--r-- | old/modules/tv/nginx/default.nix | 11 | ||||
-rw-r--r-- | old/modules/tv/nginx/options.nix | 21 |
3 files changed, 0 insertions, 81 deletions
diff --git a/old/modules/tv/nginx/config.nix b/old/modules/tv/nginx/config.nix deleted file mode 100644 index 4bfd8ad28..000000000 --- a/old/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; - } - } - ''; - }; -} diff --git a/old/modules/tv/nginx/default.nix b/old/modules/tv/nginx/default.nix deleted file mode 100644 index 49133fbb3..000000000 --- a/old/modules/tv/nginx/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -arg@{ config, pkgs, lib, ... }: - -let - cfg = config.tv.nginx; - arg' = arg // { inherit cfg; }; -in - -{ - options.tv.nginx = import ./options.nix arg'; - config = lib.mkIf cfg.enable (import ./config.nix arg'); -} diff --git a/old/modules/tv/nginx/options.nix b/old/modules/tv/nginx/options.nix deleted file mode 100644 index ddfb38049..000000000 --- a/old/modules/tv/nginx/options.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ lib, ... }: - -let - inherit (lib) mkOption types; -in - -{ - enable = mkOption { - type = types.bool; - default = false; - description = "Enable nginx."; - }; - - retiolum-locations = mkOption { - type = with types; listOf (attrsOf str); - default = []; - description = '' - TODO - ''; - }; -} |