mirror of
https://github.com/astro/buzzrelay.git
synced 2024-11-21 11:41:00 +00:00
nixos-module: add redis settings
This commit is contained in:
parent
a8461c7217
commit
0dd28356b6
1 changed files with 18 additions and 0 deletions
|
@ -37,6 +37,21 @@
|
|||
type = types.enum [ "ERROR" "WARN" "INFO" "DEBUG" "TRACE" ];
|
||||
default = "INFO";
|
||||
};
|
||||
|
||||
redis = {
|
||||
connection = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
};
|
||||
passwordFile = mkOption {
|
||||
type = with types; nullOr path;
|
||||
default = null;
|
||||
};
|
||||
in_topic = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
|
@ -50,6 +65,9 @@
|
|||
priv_key_file = cfg.privKeyFile;
|
||||
pub_key_file = cfg.pubKeyFile;
|
||||
db = "host=/var/run/postgresql user=${cfg.user} dbname=${cfg.database}";
|
||||
redis = if cfg.redis.connection != null
|
||||
then cfg.redis
|
||||
else null;
|
||||
});
|
||||
inherit (self.packages.${pkgs.system}) buzzrelay;
|
||||
in
|
||||
|
|
Loading…
Reference in a new issue