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";
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue