mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-22 20:00:54 +01:00
feat: init syncthing on arcadia
This commit is contained in:
parent
faa1489a1b
commit
b80a6ece43
1 changed files with 52 additions and 0 deletions
52
machines/arcadia/syncthing.nix
Normal file
52
machines/arcadia/syncthing.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
user = "julien";
|
||||
group = "users";
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
|
||||
settings.options = {
|
||||
urAccepted = -1;
|
||||
listenAddresses = [ "tcp://${config.machine.meta.ips.vpn.ipv4}" ];
|
||||
};
|
||||
|
||||
devices = {
|
||||
"gustave" = {
|
||||
id = "6APF3EP-TIV7ZBK-5WB5SA4-Y2K37CR-AMIB2TM-6T2VORK-UYNQO2X-TO6V2QH";
|
||||
addresses = [
|
||||
"tcp://gustave.luj:22000"
|
||||
];
|
||||
};
|
||||
|
||||
"fischer" = {
|
||||
id = "PLIMD3Z-L4DYKDB-MY4PFTS-3RMQUNF-GFWFOBB-SELW6MB-WIQJ2LM-QAC45QQ";
|
||||
addresses = [
|
||||
"tcp://fischer.luj:22000"
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
folders = {
|
||||
"dev" = {
|
||||
path = "/home/julien/dev";
|
||||
devices = [
|
||||
"gustave"
|
||||
"fischer"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.syncthing.serviceConfig.StateDirectory = "syncthing";
|
||||
systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true";
|
||||
environment.persistence."/persistent".directories = [
|
||||
{
|
||||
directory = "/home/julien/dev";
|
||||
user = "julien";
|
||||
group = "users";
|
||||
}
|
||||
];
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue