Syncthing: move device info to separate file

This commit is contained in:
Toast 2025-12-20 00:59:40 +01:00
parent beb9705d2f
commit 924e9b7ab4
4 changed files with 36 additions and 26 deletions

View file

@ -5,5 +5,6 @@ nixpkgs.lib.extend (final: prev: {
in {
patches = importLib ./patches.nix;
networkManager = importLib ./networkManager.nix;
syncthing = importLib ./syncthing.nix;
};
})

5
lib/syncthing.nix Normal file
View file

@ -0,0 +1,5 @@
{lib}: let
data = import ./../syncthing.nix;
in {
devices = builtins.getAttr "devices" data;
}

View file

@ -1,5 +1,6 @@
{
config,
lib,
flakeSelf,
...
}: let
@ -22,32 +23,7 @@ in {
urAccepted = 3;
};
# Set up devices and folders common to every device
devices = {
"phone" = {
name = "Xiaomi Redmi Note 10 Pro";
id = "K7KNZ5V-XREUADL-CROQXPV-6AA4H65-2VUD34Z-VQWKJ6S-LWWW4EE-XPNEZQ6";
};
"pc" = {
name = "Archie";
id = "NJPX754-64AQNP3-7GZFIRZ-W2EDRJQ-27ORWYM-X5YXEXQ-ERRTRTQ-BSYD4AY";
};
"steamdeck" = {
name = "Steam Deck";
id = "DNFEGEA-PDEVW5A-O5VBVQK-IUXI7J5-MAHCQAG-2JLEFFM-DSXB6AS-TX6ZHAN";
};
"server" = {
name = "Everest";
id = "2GXFZJZ-CF56ER2-SISBGOF-VNXJIG5-GQC6ECA-NHCHAPX-677RSJT-RI5POAZ";
};
"surface" = {
name = "Surface Go";
id = "HTVSF3O-AHY3TNH-BLVSEGK-HRRSMHC-H5LJWVF-NDKGM6O-ATWZALC-YXNV2Q4";
};
"winmax2" = {
name = "Win Max 2";
id = "X2NILRM-ADRBQ23-AFREAZA-62GVFDF-UVMPR4L-KGHMUNY-BJ2C3CQ-RBT43QS";
};
};
devices = lib.toast.syncthing.devices;
folders = {
"passwords" = {
label = "KeePassXC Passwords";

28
syncthing.nix Normal file
View file

@ -0,0 +1,28 @@
{
devices = {
"phone" = {
name = "Xiaomi Redmi Note 10 Pro";
id = "K7KNZ5V-XREUADL-CROQXPV-6AA4H65-2VUD34Z-VQWKJ6S-LWWW4EE-XPNEZQ6";
};
"pc" = {
name = "Archie";
id = "NJPX754-64AQNP3-7GZFIRZ-W2EDRJQ-27ORWYM-X5YXEXQ-ERRTRTQ-BSYD4AY";
};
"steamdeck" = {
name = "Steam Deck";
id = "DNFEGEA-PDEVW5A-O5VBVQK-IUXI7J5-MAHCQAG-2JLEFFM-DSXB6AS-TX6ZHAN";
};
"server" = {
name = "Everest";
id = "2GXFZJZ-CF56ER2-SISBGOF-VNXJIG5-GQC6ECA-NHCHAPX-677RSJT-RI5POAZ";
};
"surface" = {
name = "Surface Go";
id = "HTVSF3O-AHY3TNH-BLVSEGK-HRRSMHC-H5LJWVF-NDKGM6O-ATWZALC-YXNV2Q4";
};
"winmax2" = {
name = "Win Max 2";
id = "X2NILRM-ADRBQ23-AFREAZA-62GVFDF-UVMPR4L-KGHMUNY-BJ2C3CQ-RBT43QS";
};
};
}