Nouveaux services

This commit is contained in:
nyanloutre 2018-04-03 08:47:49 +02:00
parent 8e675a5d97
commit f1dc2b4b51
Signed by: nyanloutre
GPG Key ID: F85D93686A3A9063
2 changed files with 47 additions and 13 deletions

View File

@ -22,16 +22,6 @@
fsType = "vfat";
};
fileSystems."/mnt/loutrepool" =
{ device = "loutrepool";
fsType = "zfs";
};
fileSystems."/mnt/containers_volumes" =
{ device = "loutrepool/containers_volumes";
fsType = "zfs";
};
fileSystems."/mnt/medias" =
{ device = "loutrepool/medias";
fsType = "zfs";
@ -47,8 +37,28 @@
fsType = "zfs";
};
fileSystems."/mnt/influxdb" =
{ device = "loutrepool/etc/influxdb";
fileSystems."/var/db/influxdb" =
{ device = "loutrepool/var/influxdb";
fsType = "zfs";
};
fileSystems."/var/lib/grafana" =
{ device = "loutrepool/var/grafana";
fsType = "zfs";
};
fileSystems."/var/lib/emby/ProgramData-Server" =
{ device = "loutrepool/var/emby";
fsType = "zfs";
};
fileSystems."/var/lib/syncthing" =
{ device = "loutrepool/var/syncthing";
fsType = "zfs";
};
fileSystems."/var/lib/duplicati" =
{ device = "loutrepool/var/duplicati";
fsType = "zfs";
};

View File

@ -2,7 +2,7 @@
{
services.influxdb.enable = true;
services.influxdb.dataDir = "/mnt/influxdb";
services.influxdb.dataDir = "/var/db/influxdb";
services.telegraf.enable = true;
services.telegraf.extraConfig = {
@ -23,9 +23,33 @@
services.grafana.enable = true;
services.grafana.addr = "0.0.0.0";
services.grafana.dataDir = "/var/lib/grafana";
services.emby.enable = true;
services.emby.dataDir = "/var/lib/emby/ProgramData-Server";
services.syncthing.enable = true;
services.syncthing.dataDir = "/var/lib/syncthing";
services.syncthing.openDefaultPorts = true;
systemd = {
services.duplicati = {
description = "Duplicati backup";
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Slice = "machine.slice";
ExecStart = "${pkgs.rkt}/bin/rkt --insecure-options=image --pull-policy=update run --volume volume-config,kind=host,source=/var/lib/duplicati --volume volume-source,kind=host,source=/mnt/medias,readOnly=true --port 8200-tcp:8200 --dns 8.8.8.8 --dns 8.8.4.4 docker://linuxserver/duplicati";
ExecStopPost = "/usr/bin/rkt gc --mark-only";
KillMode = "mixed";
Restart = "on-failure";
RestartSec = 3;
};
enable = true;
};
};
networking.firewall.allowedTCPPorts = [
3000 # Grafana
8096 # Emby