devices/vmd32387: move syncthing to a nixos container

This commit is contained in:
steveej 2019-02-08 23:52:22 +01:00
parent 7bad36ed75
commit 2ed3f2efe2
3 changed files with 41 additions and 5 deletions

View file

@ -0,0 +1,36 @@
{ ... } @ args:
let
in args // {
config = { config, pkgs, ... }: {
imports = [
../profiles/containers/configuration.nix
];
networking.firewall.enable = true;
services.syncthing = {
enable = true;
openDefaultPorts = true;
};
};
autoStart = true;
bindMounts = {
"/var/lib/syncthing/" = {
hostPath = "/var/lib/container-volumes/syncthing/var-lib-syncthing";
isReadOnly = false;
};
};
privateNetwork = true;
forwardPorts = [
{
containerPort = 22000;
hostPort = 22000;
protocol = "tcp";
}
];
}

View file

@ -7,11 +7,6 @@
{
home-manager.users.steveej = import ../../../home-manager/configuration/text-minimal.nix;
services.syncthing = {
enable = true;
openDefaultPorts = true;
};
services.hydra = {
enable = false;
hydraURL = "http://localhost:3000"; # externally visible URL

View file

@ -80,5 +80,10 @@ in {
hostAddress = "192.168.100.12";
localAddress = "192.168.100.13";
};
syncthing = import ../../containers/syncthing.nix {
hostAddress = "192.168.100.14";
localAddress = "192.168.100.15";
};
};
}