mirror of
https://github.com/astro/buzzrelay.git
synced 2024-11-24 21:11: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" ];
|
type = types.enum [ "ERROR" "WARN" "INFO" "DEBUG" "TRACE" ];
|
||||||
default = "INFO";
|
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 =
|
config =
|
||||||
|
@ -50,6 +65,9 @@
|
||||||
priv_key_file = cfg.privKeyFile;
|
priv_key_file = cfg.privKeyFile;
|
||||||
pub_key_file = cfg.pubKeyFile;
|
pub_key_file = cfg.pubKeyFile;
|
||||||
db = "host=/var/run/postgresql user=${cfg.user} dbname=${cfg.database}";
|
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;
|
inherit (self.packages.${pkgs.system}) buzzrelay;
|
||||||
in
|
in
|
||||||
|
|
Loading…
Reference in a new issue