diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-04-04 03:18:40 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-04-25 00:04:53 +0200 |
commit | 27794e1507ab5bd4b0f31278cf8049854790e4a7 (patch) | |
tree | 99dfc96ea31dfa4a5b3995edeac1e4aa9aa37f70 /modules/websites/location-options.nix | |
parent | 72300eb8116c960935a462564d96db6fac355bca (diff) | |
download | NUR-27794e1507ab5bd4b0f31278cf8049854790e4a7.tar.gz NUR-27794e1507ab5bd4b0f31278cf8049854790e4a7.tar.zst NUR-27794e1507ab5bd4b0f31278cf8049854790e4a7.zip |
Prepare upgrade to nixos 20.03
Diffstat (limited to 'modules/websites/location-options.nix')
-rw-r--r-- | modules/websites/location-options.nix | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/modules/websites/location-options.nix b/modules/websites/location-options.nix new file mode 100644 index 00000000..8ea88f94 --- /dev/null +++ b/modules/websites/location-options.nix | |||
@@ -0,0 +1,54 @@ | |||
1 | { config, lib, name, ... }: | ||
2 | let | ||
3 | inherit (lib) mkOption types; | ||
4 | in | ||
5 | { | ||
6 | options = { | ||
7 | |||
8 | proxyPass = mkOption { | ||
9 | type = with types; nullOr str; | ||
10 | default = null; | ||
11 | example = "http://www.example.org/"; | ||
12 | description = '' | ||
13 | Sets up a simple reverse proxy as described by <link xlink:href="https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html#simple" />. | ||
14 | ''; | ||
15 | }; | ||
16 | |||
17 | index = mkOption { | ||
18 | type = with types; nullOr str; | ||
19 | default = null; | ||
20 | example = "index.php index.html"; | ||
21 | description = '' | ||
22 | Adds DirectoryIndex directive. See <link xlink:href="https://httpd.apache.org/docs/2.4/mod/mod_dir.html#directoryindex" />. | ||
23 | ''; | ||
24 | }; | ||
25 | |||
26 | alias = mkOption { | ||
27 | type = with types; nullOr path; | ||
28 | default = null; | ||
29 | example = "/your/alias/directory"; | ||
30 | description = '' | ||
31 | Alias directory for requests. See <link xlink:href="https://httpd.apache.org/docs/2.4/mod/mod_alias.html#alias" />. | ||
32 | ''; | ||
33 | }; | ||
34 | |||
35 | extraConfig = mkOption { | ||
36 | type = types.lines; | ||
37 | default = ""; | ||
38 | description = '' | ||
39 | These lines go to the end of the location verbatim. | ||
40 | ''; | ||
41 | }; | ||
42 | |||
43 | priority = mkOption { | ||
44 | type = types.int; | ||
45 | default = 1000; | ||
46 | description = '' | ||
47 | Order of this location block in relation to the others in the vhost. | ||
48 | The semantics are the same as with `lib.mkOrder`. Smaller values have | ||
49 | a greater priority. | ||
50 | ''; | ||
51 | }; | ||
52 | |||
53 | }; | ||
54 | } | ||