Merge pull request #459 from shyim/data-dir-nullable-redis

modules: make dataDir nullable in redis
This commit is contained in:
Domen Kožar 2022-04-26 13:30:25 +01:00 committed by GitHub
commit bb3baef6e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,7 +22,7 @@ in
};
services.redis.dataDir = mkOption {
type = types.path;
type = types.nullOr types.path;
default = "/var/lib/redis";
description = "Data directory for the redis database.";
};
@ -73,7 +73,7 @@ in
port ${toString cfg.port}
${optionalString (cfg.bind != null) "bind ${cfg.bind}"}
${optionalString (cfg.unixSocket != null) "unixsocket ${cfg.unixSocket}"}
dir ${cfg.dataDir}
${optionalString (cfg.dataDir != null) "dir ${cfg.dataDir}"}
appendOnly ${if cfg.appendOnly then "yes" else "no"}
${cfg.extraConfig}
'';