Ingolf Wagner 2023-01-27 10:44:42 +01:00
parent a8ec55a32d
commit e01d144885
Signed by: palo
GPG Key ID: 76BF5F1928B9618B
5 changed files with 6 additions and 114 deletions

View File

@ -12,7 +12,11 @@ let
sterni = "10.23.42.24";
bobi = "10.23.42.25";
pepe = "10.23.42.26";
robi = "144.76.13.147";
robi = "10.23.42.111";
};
subDomains = {
"transmission.robi" = hosts.robi;
"transmission2.robi" = hosts.robi;
};
network = "private";
in
@ -66,7 +70,7 @@ in
LinkLocalAddressing = no
'';
networking.extraHosts = concatStringsSep "\n" (mapAttrsToList (name: ip: "${ip} ${name}.${network}") hosts);
networking.extraHosts = concatStringsSep "\n" (mapAttrsToList (name: ip: "${ip} ${name}.${network}") (hosts // subDomains));
services.openssh.knownHosts = {
"robi" = {

View File

@ -1,89 +0,0 @@
{ 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 ];
}

View File

@ -49,12 +49,4 @@
# -----------------------------
programs.vim.defaultEditor = true;
# extra hosts
# /etc/hosts
#networking.extraHosts = ''
# ${config.module.cluster.services.tinc.private.hosts.robi.tincIp} transmission.robi.private
# ${config.module.cluster.services.tinc.private.hosts.robi.tincIp} transmission2.robi.private
#'';
}

View File

@ -10,7 +10,6 @@
./cachix.nix
./direnv.nix
./hoard.nix
#./dnsmasq.nix
./home-manager.nix
./mail-stuff.nix
#./mc.nix

View File

@ -1,14 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
{
# services.dnsmasq = {
# enable = mkDefault true;
# extraConfig = ''
# ${concatStringsSep "\n"
# (flip mapAttrsToList config.module.cluster.services.tinc."private".hosts
# (name: attrs: "address=/.${name}.private/${attrs.tincIp}"))}
# '';
# };
}