ajout de services (Elasticsearch & kibana)
parent
a4b166f1f8
commit
bdbf858a11
@ -0,0 +1,34 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf cfg.elasticsearch {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
];
|
||||||
|
|
||||||
|
# Services
|
||||||
|
|
||||||
|
## E : http://localhost:9200/_cat/indices?v
|
||||||
|
services.elasticsearch = {
|
||||||
|
enable = true;
|
||||||
|
port = 9200;
|
||||||
|
listenAddress = "127.0.0.1";
|
||||||
|
#listenAddress = "_site_";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Réseau
|
||||||
|
# -> Aucun port n'est ouvert caril est recommandé de mettre un proxy HTTP devant
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [
|
||||||
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkMerge mkThenElse;
|
||||||
|
cfg = config.r6d.config-generator;
|
||||||
|
computers = config.r6d.computers;
|
||||||
|
profiles = config.r6d.profiles;
|
||||||
|
in
|
||||||
|
|
||||||
|
mkIf cfg.kibana {
|
||||||
|
|
||||||
|
# Paquets
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
];
|
||||||
|
|
||||||
|
# Services
|
||||||
|
|
||||||
|
# K : http://localhost:8000
|
||||||
|
services.kibana = {
|
||||||
|
enable = true;
|
||||||
|
elasticsearch.url = "http://127.0.0.1:9200";
|
||||||
|
port = 8000;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Réseau
|
||||||
|
# -> Aucun port n'est ouvert caril est recommandé de mettre un proxy HTTP devant
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [
|
||||||
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue