2019-02-08 23:52:22 +01:00
|
|
|
{ ... } @ args:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2020-09-14 19:38:36 +02:00
|
|
|
in
|
|
|
|
{ syncthingPort ? 22000
|
|
|
|
}: args // {
|
|
|
|
|
2019-02-08 23:52:22 +01:00
|
|
|
config = { config, pkgs, ... }: {
|
|
|
|
imports = [
|
|
|
|
../profiles/containers/configuration.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
networking.firewall.enable = true;
|
2019-03-06 13:53:37 +01:00
|
|
|
networking.firewall.allowedTCPPorts = [
|
|
|
|
# syncthing gui
|
|
|
|
8384
|
|
|
|
];
|
2019-02-08 23:52:22 +01:00
|
|
|
|
|
|
|
services.syncthing = {
|
|
|
|
enable = true;
|
|
|
|
openDefaultPorts = true;
|
2019-03-06 13:53:37 +01:00
|
|
|
guiAddress = "0.0.0.0:8384";
|
2019-02-08 23:52:22 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
autoStart = true;
|
|
|
|
|
|
|
|
bindMounts = {
|
|
|
|
"/var/lib/syncthing/" = {
|
|
|
|
hostPath = "/var/lib/container-volumes/syncthing/var-lib-syncthing";
|
|
|
|
isReadOnly = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
privateNetwork = true;
|
|
|
|
forwardPorts = [
|
|
|
|
{
|
|
|
|
containerPort = 22000;
|
2020-09-14 19:38:36 +02:00
|
|
|
hostPort = syncthingPort;
|
2019-02-08 23:52:22 +01:00
|
|
|
protocol = "tcp";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|