aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name')
-rw-r--r--modules/by-name/an/anubis/module.nix46
1 files changed, 25 insertions, 21 deletions
diff --git a/modules/by-name/an/anubis/module.nix b/modules/by-name/an/anubis/module.nix
index 4e70e4f..4140b28 100644
--- a/modules/by-name/an/anubis/module.nix
+++ b/modules/by-name/an/anubis/module.nix
@@ -29,34 +29,38 @@
})
cfg.instances;
in {
- options.vhack.anubis.instances = lib.mkOption {
- description = ''
- Protect this reverse proxy with anubis.
+ options.vhack.anubis = {
+ enable = lib.mkEnableOption "anubis";
- The attr key is the subdomain, the value the config.
- '';
+ instances = lib.mkOption {
+ description = ''
+ Protect this reverse proxy with anubis.
- type = lib.types.attrsOf (lib.types.submodule {
- options = {
- target = lib.mkOption {
- description = "nginx `proxyPass` target";
- type = lib.types.str;
- example = "http://127.0.0.1:8080";
+ The attr key is the subdomain, the value the config.
+ '';
+
+ type = lib.types.attrsOf (lib.types.submodule {
+ options = {
+ target = lib.mkOption {
+ description = "nginx `proxyPass` target";
+ type = lib.types.str;
+ example = "http://127.0.0.1:8080";
+ };
};
- };
- config = {};
- });
+ config = {};
+ });
- default = {};
+ default = {};
- example = lib.literalExample ''
- {
- target = "http://127.0.0.1:$${toString config.servies.<name>.port}";
- }
- '';
+ example = lib.literalExample ''
+ {
+ target = "http://127.0.0.1:$${toString config.servies.<name>.port}";
+ }
+ '';
+ };
};
- config = {
+ config = lib.mkIf cfg.enable {
users = {
users.nginx.extraGroups = [
config.services.anubis.defaultOptions.group