mirror of https://gitlab.crans.org/nounous/nixos
useRedis
parent
9aa3a3122e
commit
24cc6783de
|
|
@ -14,7 +14,6 @@ in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./age.nix
|
./age.nix
|
||||||
./anubis.nix
|
|
||||||
./grub.nix
|
./grub.nix
|
||||||
./home.nix
|
./home.nix
|
||||||
./locale.nix
|
./locale.nix
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ in
|
||||||
let
|
let
|
||||||
redCfg = config.services.redis.servers.anubis;
|
redCfg = config.services.redis.servers.anubis;
|
||||||
in
|
in
|
||||||
{
|
mkIf cfg.useRedis {
|
||||||
backend = "valkey";
|
backend = "valkey";
|
||||||
parameters.url = "redis://${redCfg.bind}:${toString redCfg.port}/0";
|
parameters.url = "redis://${redCfg.bind}:${toString redCfg.port}/0";
|
||||||
};
|
};
|
||||||
|
|
@ -99,7 +99,8 @@ in
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
++ conf.bots;
|
++ conf.bots;
|
||||||
# Inclus via l’import de default-config.yaml.
|
# Inclus via l’import de default-config.yaml. Et on préfére mettre le
|
||||||
|
# whitelist Crans avant.
|
||||||
useDefaultBotRules = false;
|
useDefaultBotRules = false;
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
|
|
@ -122,7 +123,7 @@ in
|
||||||
# Meilleure licence que Redis
|
# Meilleure licence que Redis
|
||||||
package = pkgs.valkey;
|
package = pkgs.valkey;
|
||||||
servers.anubis = {
|
servers.anubis = {
|
||||||
enable = true;
|
enable = cfg.useRedis;
|
||||||
bind = "127.0.0.1";
|
bind = "127.0.0.1";
|
||||||
port = 6379;
|
port = 6379;
|
||||||
databases = 1;
|
databases = 1;
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./acme.nix
|
./acme.nix
|
||||||
|
./anubis.nix
|
||||||
./nginx.nix
|
./nginx.nix
|
||||||
./restic.nix
|
./restic.nix
|
||||||
./reverseproxy.nix
|
./reverseproxy.nix
|
||||||
|
|
|
||||||
|
|
@ -154,6 +154,7 @@ in
|
||||||
# On active Anubis
|
# On active Anubis
|
||||||
crans.anubis = {
|
crans.anubis = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
useRedis = true;
|
||||||
instances = lib.mapAttrs (vhostName: vhostConfig: {
|
instances = lib.mapAttrs (vhostName: vhostConfig: {
|
||||||
hostname = mkHostName vhostName mainTld;
|
hostname = mkHostName vhostName mainTld;
|
||||||
bind = "/run/anubis/anubis-${vhostName}/socket.sock";
|
bind = "/run/anubis/anubis-${vhostName}/socket.sock";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue