Add syncthing module

This commit is contained in:
TEC 2023-12-11 01:23:29 +08:00
parent c2dc65583c
commit c9d47524f7
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
3 changed files with 32 additions and 5 deletions

View File

@ -24,14 +24,15 @@
hosts = {
golgi.modules = with modules; [
common
admin
zsh
hardware-hetzner
hardened
agenix.nixosModules.default
forgejo
caddy
common
forgejo
hardened
hardware-hetzner
syncthing
zsh
];
};

View File

@ -34,6 +34,10 @@ In future, the following may be set up too:
"
'';
}
(mkIf config.services.syncthing.enable {
virtualHosts."syncthing.tecosaur.net".extraConfig =
''reverse_proxy ${config.services.syncthing.guiAddress}'';
})
(mkIf config.services.gitea.enable {
virtualHosts."git.tecosaur.net".extraConfig =
''

22
modules/syncthing.nix Normal file
View File

@ -0,0 +1,22 @@
{ config, lib, ... }:
with lib;
{
services.syncthing = {
enable = true;
dataDir = "/var/lib/syncthing";
guiAddress = "localhost:8384";
overrideDevices = true;
overrideFolders = true;
settings = {
gui = {
user = "tec";
password = "$2a$10$yXPBFhobbJGT3FRNEWmdRO891ZLTF247XQ2fYmJK8dsqzIWLKOPKC";
};
devices = {
"tranquillity" = { id = "VXWXMXK-MWENVPV-PV75JQH-45OP44F-QMPH645-JVWGJB2-C2GKHSV-QARV5A2"; };
};
};
};
}