Test conditional syncthing conf
This commit is contained in:
parent
fe918ab18c
commit
54527498fa
1 changed files with 35 additions and 27 deletions
|
@ -15,33 +15,39 @@
|
||||||
dataDir = config.users.users.${config.services.syncthing.user}.home;
|
dataDir = config.users.users.${config.services.syncthing.user}.home;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
devices = {
|
devices = pkgs.lib.mkMerge [
|
||||||
"helium" = {
|
{
|
||||||
id = "2MRUBSY-NHXYMAW-SY22RHP-CNNMHKR-DPDKMM4-2XV5F6M-6KSNLQI-DD4EOAM";
|
"syncthing" = {
|
||||||
addresses = [ "tcp://[fd08:d473:bcca:f0::2]:22000" ];
|
id = "ZX35ARB-3ULEUV3-NNUEREF-DEDWOJU-GE7A4PP-T7O43NI-SU564OD-E26HHA4";
|
||||||
};
|
addresses = [ "tcp://syncthing.vsinerva.fi:22000" ];
|
||||||
"lithium" = {
|
};
|
||||||
id = "S4ZORDV-QBY7QC7-FQHADMZ-NQSKJUA-7B7LQNS-CWJLSMG-JPMN7YJ-OVRDZQA";
|
}
|
||||||
addresses = [ "tcp://[fd08:d473:bcca:f0::3]:22000" ];
|
(pkgs.lib.mkIf (config.networking.hostName == "syncthing") {
|
||||||
};
|
"helium" = {
|
||||||
"syncthing" = {
|
id = "2MRUBSY-NHXYMAW-SY22RHP-CNNMHKR-DPDKMM4-2XV5F6M-6KSNLQI-DD4EOAM";
|
||||||
id = "ZX35ARB-3ULEUV3-NNUEREF-DEDWOJU-GE7A4PP-T7O43NI-SU564OD-E26HHA4";
|
addresses = [ "tcp://[fd08:d473:bcca:f0::2]:22000" ];
|
||||||
addresses = [ "tcp://syncthing.vsinerva.fi:22000" ];
|
};
|
||||||
};
|
"lithium" = {
|
||||||
"phone" = {
|
id = "S4ZORDV-QBY7QC7-FQHADMZ-NQSKJUA-7B7LQNS-CWJLSMG-JPMN7YJ-OVRDZQA";
|
||||||
id = "K6QCK2R-BU65RAC-PHTGLIA-24IHDXE-N6VNBAW-QYREMVD-XWGWKRA-VX2BNAK";
|
addresses = [ "tcp://[fd08:d473:bcca:f0::3]:22000" ];
|
||||||
addresses = [ "tcp://[fd08:d473:bcca:f0::10]:22000" ];
|
};
|
||||||
};
|
"phone" = {
|
||||||
};
|
id = "K6QCK2R-BU65RAC-PHTGLIA-24IHDXE-N6VNBAW-QYREMVD-XWGWKRA-VX2BNAK";
|
||||||
|
addresses = [ "tcp://[fd08:d473:bcca:f0::10]:22000" ];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
folders =
|
folders =
|
||||||
let
|
let
|
||||||
default = {
|
default = {
|
||||||
devices = [
|
devices = pkgs.lib.mkMerge [
|
||||||
"helium"
|
[ "syncthing" ]
|
||||||
"lithium"
|
(pkgs.lib.mkIf (config.networking.hostName == "syncthing") [
|
||||||
"syncthing"
|
"helium"
|
||||||
"phone"
|
"lithium"
|
||||||
|
"phone"
|
||||||
|
])
|
||||||
];
|
];
|
||||||
versioning = {
|
versioning = {
|
||||||
type = "trashcan";
|
type = "trashcan";
|
||||||
|
@ -50,10 +56,12 @@
|
||||||
fsWatcherDelayS = 1;
|
fsWatcherDelayS = 1;
|
||||||
};
|
};
|
||||||
default-no-phone = default // {
|
default-no-phone = default // {
|
||||||
devices = [
|
devices = pkgs.lib.mkMerge [
|
||||||
"helium"
|
[ "syncthing" ]
|
||||||
"lithium"
|
(pkgs.lib.mkIf (config.networking.hostName == "syncthing") [
|
||||||
"syncthing"
|
"helium"
|
||||||
|
"lithium"
|
||||||
|
])
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue