devices/vmd32387: move syncthing to a nixos container
This commit is contained in:
parent
7bad36ed75
commit
2ed3f2efe2
3 changed files with 41 additions and 5 deletions
36
nix/os/containers/syncthing.nix
Normal file
36
nix/os/containers/syncthing.nix
Normal 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";
|
||||
}
|
||||
];
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue