add neo4j
This commit is contained in:
parent
410b394019
commit
c52e809a99
4 changed files with 113 additions and 21 deletions
|
@ -18,6 +18,7 @@
|
|||
./mpd.nix
|
||||
./grocy.nix
|
||||
./taskwarrior-pushover.nix
|
||||
./neo4j.nix
|
||||
|
||||
];
|
||||
|
||||
|
|
89
nixos/configs/pepe/neo4j.nix
Normal file
89
nixos/configs/pepe/neo4j.nix
Normal file
|
@ -0,0 +1,89 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
# neo4j container managment
|
||||
# -------------------------
|
||||
|
||||
virtualisation.oci-containers.containers =
|
||||
let
|
||||
neo4j_config = {
|
||||
image = "neo4j";
|
||||
environment = {
|
||||
NEO4J_AUTH = "none"; # for development purpose
|
||||
NEO4J_apoc_export_file_enabled = "true";
|
||||
NEO4J_apoc_import_file_enabled = "true";
|
||||
NEO4J_apoc_import_file_use__neo4j__config = "true";
|
||||
NEO4JLABS_PLUGINS = ''["apoc","n10s"]'';
|
||||
};
|
||||
ports = [
|
||||
"127.0.0.1:7474:7474" # http port
|
||||
"127.0.0.1:17687:7687" # bolt port
|
||||
];
|
||||
volumes = [
|
||||
"/var/lib/neo4j/data:/data"
|
||||
"/var/lib/neo4j/logs:/logs"
|
||||
"/var/lib/neo4j/conf:/conf"
|
||||
"/var/lib/neo4j/import:/import" # for database imports
|
||||
"/var/lib/neo4j/plugins:/plugins"
|
||||
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
neo4j = neo4j_config;
|
||||
#neo4jbackup = neo4j_config // {
|
||||
# autoStart = false;
|
||||
# volumes = [
|
||||
# "/var/lib/neo4j/data:/data"
|
||||
# "/var/lib/neo4j/backups:/backups"
|
||||
# ];
|
||||
# cmd = ["neo4j-admin" "dump" "--verbose" "--to=/backups/neo4j.dump"];
|
||||
#};
|
||||
};
|
||||
|
||||
#systemd.services."docker-neo4jbackup" = {
|
||||
# preStart = "systemctrl stop docker-neo4j";
|
||||
# postStop = "systemctrl start docker-neo4j";
|
||||
#};
|
||||
|
||||
|
||||
# backups
|
||||
# -------
|
||||
backup.dirs = [ "/var/lib/neo4j/backups" ];
|
||||
|
||||
# todo run frequently :
|
||||
# docker exec --interactive --tty neo4j neo4j-admin dump --verbose --to /dump/neo4j.dump
|
||||
# https://neo4j.com/docs/operations-manual/current/docker/maintenance/
|
||||
|
||||
|
||||
# nginx publishing
|
||||
# ----------------
|
||||
services.nginx.streamConfig = ''
|
||||
# configure neo4j bolt port
|
||||
server {
|
||||
allow 192.168.0.0/16; # allow private ip range class c
|
||||
allow ${config.module.cluster.services.tinc."private".networkSubnet}; # allow private tinc network
|
||||
deny all;
|
||||
listen 7687;
|
||||
proxy_pass localhost:17687;
|
||||
}
|
||||
'';
|
||||
|
||||
services.nginx.virtualHosts."neo4j.${config.networking.hostName}.private" = {
|
||||
serverAliases = [ config.networking.hostName ];
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
allow 192.168.0.0/16; # allow private ip range class c
|
||||
allow ${config.module.cluster.services.tinc."private".networkSubnet}; # allow private tinc network
|
||||
deny all;
|
||||
'';
|
||||
proxyPass = "http://localhost:7474";
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 7687 ];
|
||||
#networking.firewall.allowedUDPPorts = [ 80 ];
|
||||
|
||||
|
||||
}
|
|
@ -39,6 +39,8 @@ in
|
|||
exec ${pkgs.nixUnstable}/bin/nix --experimental-features "nix-command flakes" "$@"
|
||||
'')
|
||||
|
||||
neo4j-desktop
|
||||
|
||||
sweethome3d.application
|
||||
pkgs.polygon-art.polygon-art
|
||||
|
||||
|
|
|
@ -4,27 +4,27 @@ with lib;
|
|||
|
||||
let
|
||||
|
||||
# Lassulus streaming setup
|
||||
# -------------------------
|
||||
# ffmpeg \
|
||||
# -f pulse \
|
||||
# -i default \
|
||||
# -vaapi_device /dev/dri/renderD128 \
|
||||
# -f x11grab \
|
||||
# -video_size 1366x768 \
|
||||
# -i :0 \
|
||||
# -vf 'hwupload,scale_vaapi=format=nv12' \
|
||||
# -c:v h264_vaapi \
|
||||
# -c:a aac \
|
||||
# -b:a 96k \
|
||||
# -af "highpass=f=200, lowpass=f=3000" \
|
||||
# -qp 30 \
|
||||
# -f flv \
|
||||
# rtmp://lassul.us:1935/stream/nixos \
|
||||
# ./rc3-output-$(date +%d%H%M%S).mp4
|
||||
#
|
||||
# Dann abspielen mit :
|
||||
# mpv rtmp://lassul.us:1935/stream/nixos
|
||||
# Lassulus streaming setup
|
||||
# -------------------------
|
||||
# ffmpeg \
|
||||
# -f pulse \
|
||||
# -i default \
|
||||
# -vaapi_device /dev/dri/renderD128 \
|
||||
# -f x11grab \
|
||||
# -video_size 1366x768 \
|
||||
# -i :0 \
|
||||
# -vf 'hwupload,scale_vaapi=format=nv12' \
|
||||
# -c:v h264_vaapi \
|
||||
# -c:a aac \
|
||||
# -b:a 96k \
|
||||
# -af "highpass=f=200, lowpass=f=3000" \
|
||||
# -qp 30 \
|
||||
# -f flv \
|
||||
# rtmp://lassul.us:1935/stream/nixos \
|
||||
# ./rc3-output-$(date +%d%H%M%S).mp4
|
||||
#
|
||||
# Dann abspielen mit :
|
||||
# mpv rtmp://lassul.us:1935/stream/nixos
|
||||
|
||||
cfg = config.programs.custom.video;
|
||||
|
||||
|
|
Loading…
Reference in a new issue