summary refs log tree commit diff
path: root/nixos/modules/services/databases/redis.nix
diff options
context:
space:
mode:
authorJanne Heß <janne@hess.ooo>2019-12-30 00:06:23 +0100
committerJörg Thalheim <joerg@thalheim.io>2020-06-30 09:36:40 +0100
commit9786adf23b05218ddbb4623f803c5380c1751ecc (patch)
treebcf2a8954739a14987e898174f36c164b7ac2a0a /nixos/modules/services/databases/redis.nix
parentb3d1377084a2f2b1ffa682efaaa575e178604863 (diff)
downloadnixpkgs-9786adf23b05218ddbb4623f803c5380c1751ecc.tar
nixpkgs-9786adf23b05218ddbb4623f803c5380c1751ecc.tar.gz
nixpkgs-9786adf23b05218ddbb4623f803c5380c1751ecc.tar.bz2
nixpkgs-9786adf23b05218ddbb4623f803c5380c1751ecc.tar.lz
nixpkgs-9786adf23b05218ddbb4623f803c5380c1751ecc.tar.xz
nixpkgs-9786adf23b05218ddbb4623f803c5380c1751ecc.tar.zst
nixpkgs-9786adf23b05218ddbb4623f803c5380c1751ecc.zip
nixos/redis: Type all options
redis: switch back to mkOption
Diffstat (limited to 'nixos/modules/services/databases/redis.nix')
-rw-r--r--nixos/modules/services/databases/redis.nix21
1 files changed, 19 insertions, 2 deletions
diff --git a/nixos/modules/services/databases/redis.nix b/nixos/modules/services/databases/redis.nix
index f1777854e14..4d2554786a3 100644
--- a/nixos/modules/services/databases/redis.nix
+++ b/nixos/modules/services/databases/redis.nix
@@ -133,12 +133,29 @@ in
       };
 
       slaveOf = mkOption {
-        default = null; # { ip, port }
-        description = "An attribute set with two attributes: ip and port to which this redis instance acts as a slave.";
+        type = with types; nullOr (submodule ({ ... }: {
+          options = {
+            ip = mkOption {
+              type = str;
+              description = "IP of the Redis master";
+              example = "192.168.1.100";
+            };
+
+            port = mkOption {
+              type = port;
+              description = "port of the Redis master";
+              default = 6379;
+            };
+          };
+        }));
+
+        default = null;
+        description = "IP and port to which this redis instance acts as a slave.";
         example = { ip = "192.168.1.100"; port = 6379; };
       };
 
       masterAuth = mkOption {
+        type = types.str;
         default = null;
         description = ''If the master is password protected (using the requirePass configuration)
         it is possible to tell the slave to authenticate before starting the replication synchronization