Enable syncthing on sisko

This commit is contained in:
Andrea Ciceri 2024-10-17 23:20:28 +02:00
parent 2874437ab9
commit a8cc32d0e0
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
2 changed files with 13 additions and 11 deletions

View file

@ -34,6 +34,7 @@
"adb"
"binfmt"
"prometheus-exporters"
"syncthing"
]
++ [
./disko.nix

View file

@ -4,12 +4,13 @@
syncthing = {
enable = true;
guiAddress = "${config.networking.hostName}.fleet:8434";
user = config.ccr.username;
dataDir = "/home/${config.ccr.username}";
# TODO Use the home-manager module instead of the following conditions
user = if config.networking.hostName == "sisko" then "syncthing" else "ccr";
dataDir = if config.networking.hostName == "sisko" then "/mnt/hd/syncthing" else "/home/ccr";
settings = {
options = {
urAccepted = 1; # anonymous usage data report
globalAnnounceEnabled = false; # Only sync on the VPN
globalAnnounceEnabled = false; # Only sync when connected to the VPN
};
devices = {
picard = {
@ -19,7 +20,7 @@
];
};
sisko = {
id = "L5RAQXR-6U3ANNK-UJJ5AVN-37VKQRB-UK6HXSU-NN3V6HF-JNZEVA5-NI6UEAP";
id = "5JYQLMP-KNBMSOE-I452UDU-UTKPXJI-K27X2DI-MSCSRCG-6V54Q6U-NVGXPQA";
addresses = [
"tcp://sisko.fleet"
];
@ -31,7 +32,7 @@
];
};
oneplus8t = {
id = "76BJ2ZE-FPFDWUZ-3UZIENZ-TS6YBGG-EZSF6UE-GLHRBQ2-KTHTRMI-3JWNRAT";
id = "KMB2YRF-DGTWU24-SLITU23-5TN7BMQ-6PFAQQZ-CZ7J2QL-PIGVBTU-VRFRMQV";
addresses = [
"tcp://oneplus8t.fleet"
];
@ -41,9 +42,9 @@
org = {
path =
{
picard = "/home/${config.ccr.username}/org";
sisko = "/home/${config.ccr.username}/org";
kirk = "/home/${config.ccr.username}/org";
picard = "/home/ccr/org";
sisko = "/mnt/hd/syncthing/org";
kirk = "/home/ccr/org";
}
.${config.networking.hostName};
devices = [
@ -56,9 +57,9 @@
sync = {
path =
{
picard = "/home/${config.ccr.username}/sync";
sisko = "/home/${config.ccr.username}/sync";
kirk = "/home/${config.ccr.username}/sync";
picard = "/home/ccr/sync";
sisko = "/mnt/hd/syncthing/sync";
kirk = "/home/ccr/sync";
}
.${config.networking.hostName};
devices = [