commit 14b0dc69cb56f48d0f3d0aec116ee80fd9a90ea4
parent 60c15af3496cd32c8decce080c2731abe8226b70
Author: vin <vin@vineetk.net>
Date: Wed, 29 Jan 2025 02:21:27 -0500
try out syncthing again
It's very annoying having to manually rsync my files to and from my
laptop. When I tried unison before, it defaults to asking for every
single new/modified file it seemed and just felt clunky. Since
Syncthing has an unofficial FOSS iOS app called SyncTrain/SushiTrain,
I wanted to give it another shot.
Diffstat:
2 files changed, 98 insertions(+), 7 deletions(-)
diff --git a/home.nix b/home.nix
@@ -59,7 +59,11 @@ in {
AGE_KEY = "$HOME/.ssh/id_ed25519";
AGE_PUB = "$AGE_KEY.pub";
- KASI_DIR = "/data/kasi";
+ KASI_DIR =
+ if hostname == "demiurge" then
+ "/data/kasi"
+ else
+ "/home/vin/.kasi";
KASI_ENCRYPT = "age -R $AGE_PUB";
KASI_DECRYPT = "age -d -i $AGE_KEY";
KASI_EXT = "age";
@@ -566,7 +570,99 @@ set-option -sa terminal-features ',*:RGB'
temperature.day = 6500;
temperature.night = 4500;
};
- };
+
+ syncthing = {
+ enable = true;
+ settings = {
+ devices = {
+ demiurge = {
+ addresses = [
+ "tcp://192.168.1.2:22000"
+ "tcp://10.0.13.2:22000"
+ ];
+ id = "Y2XNSCK-DQYYKWZ-DCKSCH2-QWRHQJV-5RLNTZF-RX2QOKL-RZ7J67Z-HGMK2Q2";
+ };
+
+ lappy = {
+ addresses = [
+ "tcp://192.168.1.3:22000"
+ "tcp://10.0.13.3:22000"
+ ];
+ id = "ZJ55XB6-VJ62N4F-5LTRNV3-JMIFI3G-TKAI2BZ-42QAFNJ-QDMVJ6I-O7KHQQ6";
+ };
+
+ iphonebob = {
+ addresses = [
+ "tcp://192.168.1.4:22000"
+ "tcp://10.0.13.4:22000"
+ ];
+ id = "ZD43FM5-WIZLODC-PR335XA-FQBSEQK-2ZZKWG3-UHTX57B-6VDVDCX-PPNI4AD";
+ };
+ };
+
+ folders = {
+ "bin" = {
+ devices = [ "demiurge" "lappy" ];
+ path =
+ if hostname == "demiurge" then
+ "/data/bin"
+ else
+ "/home/vin/bin";
+ };
+
+ "docs" = {
+ devices = [ "demiurge" "lappy" ];
+ path =
+ if hostname == "demiurge" then
+ "/data/docs"
+ else
+ "/home/vin/docs";
+ };
+
+ "emacs.d" = {
+ devices = [ "demiurge" "lappy" ];
+ path = "/home/vin/.emacs.d";
+ };
+
+ "kasi" = {
+ devices = [ "demiurge" "lappy" ];
+ path =
+ if hostname == "demiurge" then
+ "/data/kasi"
+ else
+ "/home/vin/.kasi";
+ };
+
+ "lit" = {
+ devices = [ "demiurge" "lappy" ];
+ path =
+ if hostname == "demiurge" then
+ "/data_warm/lit"
+ else
+ "/home/vin/lit";
+ };
+
+ "pics" = {
+ devices = [ "demiurge" "lappy" ];
+ path =
+ if hostname == "demiurge" then
+ "/data_warm/pics"
+ else
+ "/home/vin/pics";
+ };
+
+ "iphone" = {
+ devices = [ "demiurge" "lappy" "iphonebob" ];
+ path =
+ if hostname == "demiurge" then
+ "/data_warm/iphone"
+ else
+ "/home/vin/iphone";
+ };
+ };
+ };
+ };
+ };
xdg = {
enable = true;
diff --git a/hosts/lappy/hardware.nix b/hosts/lappy/hardware.nix
@@ -33,11 +33,6 @@
fsType = "zfs";
};
- fileSystems."/data" =
- { device = "zroot/data";
- fsType = "zfs";
- };
-
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/BCF1-95FF";
fsType = "vfat";