Move folder and device descriptions into dedicated expression files
This commit is contained in:
parent
a87cfeef05
commit
11a5d8da27
|
@ -5,7 +5,7 @@
|
|||
./nextcloud
|
||||
./openvpn/Legion.nix
|
||||
./sshd
|
||||
# ./syncthing/Legion.nix
|
||||
./syncthing/Legion.nix
|
||||
./terraria/windy_limbo_of_melancholy.nix
|
||||
./traefik/adguardhome.nix
|
||||
./traefik/gitea.nix
|
||||
|
|
|
@ -1,60 +1,38 @@
|
|||
{...}: {
|
||||
imports = [./default.nix ./devices];
|
||||
imports = [
|
||||
./default.nix
|
||||
./devices/H0615.nix
|
||||
./devices/Ion.nix
|
||||
./devices/Monarch.nix
|
||||
./devices/Northstar.nix
|
||||
./devices/Remarkable.nix
|
||||
./devices/Vanguard.nix
|
||||
./folders/archive.nix
|
||||
./folders/books.nix
|
||||
./folders/camera.nix
|
||||
./folders/comics.nix
|
||||
./folders/documents.nix
|
||||
./folders/exports.nix
|
||||
./folders/movies.nix
|
||||
./folders/notes.nix
|
||||
./folders/pictures.nix
|
||||
./folders/xochitl.nix
|
||||
];
|
||||
services.syncthing = {
|
||||
user = "xenia";
|
||||
group = "users";
|
||||
dataDir = "/var/lib/syncthing";
|
||||
extraOptions.options.globalAnnounceEnabled = true;
|
||||
folders = {
|
||||
"Archive" = {
|
||||
path = "/var/lib/syncthing/archive";
|
||||
devices = ["ion" "monarch" "northstar"];
|
||||
enable = true;
|
||||
};
|
||||
"Books" = {
|
||||
path = "/var/lib/syncthing/books";
|
||||
devices = ["monarch" "northstar" "remarkable"];
|
||||
enable = true;
|
||||
};
|
||||
"Camera" = {
|
||||
path = "/var/lib/syncthing/camera";
|
||||
devices = ["ion"];
|
||||
enable = true;
|
||||
};
|
||||
"Comics" = {
|
||||
path = "/home/xenia/Documents/Comics";
|
||||
devices = ["ion" "monarch" "northstar"];
|
||||
enable = true;
|
||||
};
|
||||
"Documents" = {
|
||||
path = "/var/lib/syncthing/documents";
|
||||
devices = ["monarch" "northstar"];
|
||||
enable = true;
|
||||
};
|
||||
"Exports" = {
|
||||
path = "/var/lib/syncthing/exports";
|
||||
devices = ["monarch"];
|
||||
enable = true;
|
||||
};
|
||||
"Movies" = {
|
||||
path = "/var/lib/syncthing/movies";
|
||||
devices = ["ion" "monarch" "northstar"];
|
||||
enable = true;
|
||||
};
|
||||
"Notes" = {
|
||||
path = "/home/xenia/notes";
|
||||
devices = ["ion" "monarch" "northstar" "H0615"];
|
||||
enable = true;
|
||||
};
|
||||
"Pictures" = {
|
||||
path = "/var/lib/syncthing/pictures";
|
||||
devices = ["ion" "monarch" "northstar"];
|
||||
enable = true;
|
||||
};
|
||||
"Xochitl" = {
|
||||
path = "/var/lib/syncthing/xochitl";
|
||||
devices = ["remarkable"];
|
||||
enable = true;
|
||||
};
|
||||
"Archive".devices = ["ion" "monarch" "northstar" "vanguard"];
|
||||
"Books".devices = ["monarch" "northstar" "remarkable" "vanguard"];
|
||||
"Camera".devices = ["ion"];
|
||||
"Comics".devices = ["ion" "monarch" "northstar" "vanguard"];
|
||||
"Documents".devices = ["monarch" "northstar" "vanguard"];
|
||||
"Exports".devices = ["monarch" "vanguard"];
|
||||
"Movies".devices = ["ion" "monarch" "northstar" "vanguard"];
|
||||
"Notes".devices = ["H0615" "ion" "monarch" "northstar" "vanguard"];
|
||||
"Pictures".devices = ["ion" "monarch" "northstar" "vanguard"];
|
||||
"Xochitl".devices = ["remarkable"];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,59 +1,68 @@
|
|||
{...}: {
|
||||
imports = [./default.nix ./devices];
|
||||
imports = [
|
||||
./default.nix
|
||||
./devices/H0615.nix
|
||||
./devices/Ion.nix
|
||||
./devices/Legion.nix
|
||||
./devices/Monarch.nix
|
||||
./devices/Northstar.nix
|
||||
./devices/Remarkable.nix
|
||||
./folders/archive.nix
|
||||
./folders/books.nix
|
||||
./folders/camera.nix
|
||||
./folders/comics.nix
|
||||
./folders/documents.nix
|
||||
./folders/exports.nix
|
||||
./folders/movies.nix
|
||||
./folders/notes.nix
|
||||
./folders/pictures.nix
|
||||
./folders/xochitl.nix
|
||||
];
|
||||
services.syncthing = {
|
||||
user = "xenia";
|
||||
group = "users";
|
||||
dataDir = "/mnt/secondary/syncthing";
|
||||
extraOptions.options.globalAnnounceEnabled = true;
|
||||
folders = {
|
||||
"Archive" = {
|
||||
path = "/mnt/secondary/syncthing/archive";
|
||||
devices = ["ion" "monarch" "northstar"];
|
||||
enable = true;
|
||||
devices = ["ion" "legion" "monarch" "northstar"];
|
||||
};
|
||||
"Books" = {
|
||||
path = "/mnt/secondary/syncthing/books";
|
||||
devices = ["monarch" "northstar" "remarkable"];
|
||||
enable = true;
|
||||
devices = ["legion" "monarch" "northstar" "remarkable"];
|
||||
};
|
||||
"Camera" = {
|
||||
path = "/mnt/secondary/syncthing/camera";
|
||||
devices = ["ion"];
|
||||
enable = true;
|
||||
};
|
||||
"Comics" = {
|
||||
path = "/home/xenia/Documents/Comics";
|
||||
devices = ["ion" "monarch" "northstar"];
|
||||
enable = true;
|
||||
devices = ["ion" "legion" "monarch" "northstar"];
|
||||
};
|
||||
"Documents" = {
|
||||
path = "/mnt/secondary/syncthing/documents";
|
||||
devices = ["monarch" "northstar"];
|
||||
enable = true;
|
||||
devices = ["legion" "monarch" "northstar"];
|
||||
};
|
||||
"Exports" = {
|
||||
path = "/mnt/secondary/syncthing/exports";
|
||||
devices = ["monarch"];
|
||||
enable = true;
|
||||
devices = ["legion" "monarch"];
|
||||
};
|
||||
"Movies" = {
|
||||
path = "/mnt/secondary/syncthing/movies";
|
||||
devices = ["ion" "monarch" "northstar"];
|
||||
enable = true;
|
||||
devices = ["ion" "legion" "monarch" "northstar"];
|
||||
};
|
||||
"Notes" = {
|
||||
path = "/home/xenia/notes";
|
||||
devices = ["ion" "monarch" "northstar" "H0615"];
|
||||
enable = true;
|
||||
devices = ["ion" "legion" "monarch" "northstar" "H0615"];
|
||||
};
|
||||
"Pictures" = {
|
||||
path = "/mnt/secondary/syncthing/pictures";
|
||||
devices = ["ion" "monarch" "northstar"];
|
||||
enable = true;
|
||||
devices = ["ion" "legion" "monarch" "northstar"];
|
||||
};
|
||||
"Xochitl" = {
|
||||
path = "/mnt/secondary/syncthing/xochitl";
|
||||
devices = ["remarkable"];
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{lib, ...}: {
|
||||
imports = [./folders];
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
systemService = true;
|
||||
|
|
1
services/syncthing/devices/H0615.nix
Normal file
1
services/syncthing/devices/H0615.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{...}: {services.syncthing.devices."H0615".id = "VVKKUT6-DMNEJ6J-ZI2QREG-SOLG7S5-V2V6WN3-UCQH2EN-6S2XXLS-FKN6KQF";}
|
1
services/syncthing/devices/Ion.nix
Normal file
1
services/syncthing/devices/Ion.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{...}: {services.syncthing.devices."ion".id = "7DD4NPH-6T2ET5A-4FCLFWW-CS6UR2W-IO5XQXC-DM5B2Q4-6X7DGU2-UKKVEAB";}
|
1
services/syncthing/devices/Legion.nix
Normal file
1
services/syncthing/devices/Legion.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{...}: {services.syncthing.devices."legion".id = "6OX54CG-EAQMXKA-K7TXB5P-G5A27HB-52JE2FA-XNAYZU6-YMIDBXP-RKPBJQV";}
|
1
services/syncthing/devices/Monarch.nix
Normal file
1
services/syncthing/devices/Monarch.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{...}: {services.syncthing.devices."monarch".id = "CJSUZQY-67XBLEZ-VKVHQHI-BLEUZNF-G4237AV-AW44CGH-F3JDKXU-CWT3RQZ";}
|
1
services/syncthing/devices/Northstar.nix
Normal file
1
services/syncthing/devices/Northstar.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{...}: {services.syncthing.devices."northstar".id = "DMQZNMB-BM3SSE4-5XV2GHE-IDRNFTS-QNZSICS-6JWHUCV-O3NHMWY-2OBC2QD";}
|
1
services/syncthing/devices/Remarkable.nix
Normal file
1
services/syncthing/devices/Remarkable.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{...}: {services.syncthing.devices."remarkable".id = "GHB6JKS-JOA3HHP-TYHB3IJ-GLV26QW-RWRZAMG-XYFGFB6-QLUHDSH-GNPZVAO";}
|
1
services/syncthing/devices/Vanguard.nix
Normal file
1
services/syncthing/devices/Vanguard.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{...}: {services.syncthing.devices."vanguard".id = "YNGBLJP-TWY6Y3C-DPPYAWL-3ZQFNQH-RDPIU5T-L54UI62-FPPA3JQ-WYXBZQZ";}
|
|
@ -1,10 +0,0 @@
|
|||
{...}: {
|
||||
services.syncthing.devices = {
|
||||
"H0615".id = "VVKKUT6-DMNEJ6J-ZI2QREG-SOLG7S5-V2V6WN3-UCQH2EN-6S2XXLS-FKN6KQF";
|
||||
"ion".id = "7DD4NPH-6T2ET5A-4FCLFWW-CS6UR2W-IO5XQXC-DM5B2Q4-6X7DGU2-UKKVEAB";
|
||||
"monarch".id = "CJSUZQY-67XBLEZ-VKVHQHI-BLEUZNF-G4237AV-AW44CGH-F3JDKXU-CWT3RQZ";
|
||||
"northstar".id = "DMQZNMB-BM3SSE4-5XV2GHE-IDRNFTS-QNZSICS-6JWHUCV-O3NHMWY-2OBC2QD";
|
||||
"remarkable".id = "GHB6JKS-JOA3HHP-TYHB3IJ-GLV26QW-RWRZAMG-XYFGFB6-QLUHDSH-GNPZVAO";
|
||||
"vanguard".id = "YNGBLJP-TWY6Y3C-DPPYAWL-3ZQFNQH-RDPIU5T-L54UI62-FPPA3JQ-WYXBZQZ";
|
||||
};
|
||||
}
|
9
services/syncthing/folders/archive.nix
Normal file
9
services/syncthing/folders/archive.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{lib, ...}: {
|
||||
services.syncthing.folders."Archive" = {
|
||||
label = "Archive";
|
||||
path = lib.mkDefault "/var/lib/syncthing/Archive/";
|
||||
id = "hwnqy-xzcdx";
|
||||
ignorePerms = true;
|
||||
enable = true;
|
||||
};
|
||||
}
|
9
services/syncthing/folders/books.nix
Normal file
9
services/syncthing/folders/books.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{lib, ...}: {
|
||||
services.syncthing.folders."Books" = {
|
||||
label = "Books";
|
||||
path = lib.mkDefault "/var/lib/syncthing/Books/";
|
||||
id = "zjmxy-ycmbq";
|
||||
ignorePerms = true;
|
||||
enable = true;
|
||||
};
|
||||
}
|
10
services/syncthing/folders/camera.nix
Normal file
10
services/syncthing/folders/camera.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{lib, ...}: {
|
||||
services.syncthing.folders."Camera" = {
|
||||
label = "Camera";
|
||||
path = lib.mkDefault "/var/lib/syncthing/Camera/";
|
||||
id = "fp4_4j7w-photos";
|
||||
type = "receiveonly";
|
||||
ignorePerms = true;
|
||||
enable = true;
|
||||
};
|
||||
}
|
9
services/syncthing/folders/comics.nix
Normal file
9
services/syncthing/folders/comics.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{lib, ...}: {
|
||||
services.syncthing.folders."Comics" = {
|
||||
label = "Comics";
|
||||
path = lib.mkDefault "/var/lib/syncthing/Comics/";
|
||||
id = "kc2h0-q3wot";
|
||||
ignorePerms = true;
|
||||
enable = true;
|
||||
};
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
{lib, ...}: {
|
||||
services.syncthing.folders = {
|
||||
"Archive" = {
|
||||
label = "Archive";
|
||||
id = "hwnqy-xzcdx";
|
||||
ignorePerms = true;
|
||||
enable = lib.mkDefault false;
|
||||
};
|
||||
"Books" = {
|
||||
label = "Books";
|
||||
id = "zjmxy-ycmbq";
|
||||
ignorePerms = true;
|
||||
enable = lib.mkDefault false;
|
||||
};
|
||||
"Camera" = {
|
||||
label = "Camera";
|
||||
id = "fp4_4j7w-photos";
|
||||
type = "receiveonly";
|
||||
ignorePerms = true;
|
||||
enable = lib.mkDefault false;
|
||||
};
|
||||
"Comics" = {
|
||||
label = "Comics";
|
||||
id = "kc2h0-q3wot";
|
||||
ignorePerms = true;
|
||||
enable = lib.mkDefault false;
|
||||
};
|
||||
"Documents" = {
|
||||
label = "Documents";
|
||||
id = "qc6qa-bipsd";
|
||||
ignorePerms = true;
|
||||
enable = lib.mkDefault false;
|
||||
};
|
||||
"Exports" = {
|
||||
label = "Exports";
|
||||
id = "tof2e-pdtde";
|
||||
ignorePerms = true;
|
||||
enable = lib.mkDefault false;
|
||||
};
|
||||
"Movies" = {
|
||||
label = "Movies";
|
||||
id = "3f75o-4x6sq";
|
||||
ignorePerms = true;
|
||||
enable = lib.mkDefault false;
|
||||
};
|
||||
"Notes" = {
|
||||
label = "Notes";
|
||||
id = "4ggjz-5dyop";
|
||||
ignorePerms = true;
|
||||
enable = lib.mkDefault false;
|
||||
};
|
||||
"Pictures" = {
|
||||
label = "Pictures";
|
||||
id = "ziuj8-rm6dn";
|
||||
ignorePerms = true;
|
||||
enable = lib.mkDefault false;
|
||||
};
|
||||
"Xochitl" = {
|
||||
label = "Xochitl";
|
||||
id = "dkcbx-kq7hl";
|
||||
type = "receiveonly";
|
||||
ignorePerms = true;
|
||||
enable = lib.mkDefault false;
|
||||
};
|
||||
};
|
||||
}
|
9
services/syncthing/folders/documents.nix
Normal file
9
services/syncthing/folders/documents.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{lib, ...}: {
|
||||
services.syncthing.folders."Documents" = {
|
||||
label = "Documents";
|
||||
path = lib.mkDefault "/var/lib/syncthing/Documents/";
|
||||
id = "qc6qa-bipsd";
|
||||
ignorePerms = true;
|
||||
enable = true;
|
||||
};
|
||||
}
|
9
services/syncthing/folders/exports.nix
Normal file
9
services/syncthing/folders/exports.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{lib, ...}: {
|
||||
services.syncthing.folders."Exports" = {
|
||||
label = "Exports";
|
||||
path = lib.mkDefault "/var/lib/syncthing/Exports/";
|
||||
id = "tof2e-pdtde";
|
||||
ignorePerms = true;
|
||||
enable = true;
|
||||
};
|
||||
}
|
9
services/syncthing/folders/movies.nix
Normal file
9
services/syncthing/folders/movies.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{lib, ...}: {
|
||||
services.syncthing.folders."Movies" = {
|
||||
label = "Movies";
|
||||
path = lib.mkDefault "/var/lib/syncthing/Movies/";
|
||||
id = "3f75o-4x6sq";
|
||||
ignorePerms = true;
|
||||
enable = true;
|
||||
};
|
||||
}
|
9
services/syncthing/folders/notes.nix
Normal file
9
services/syncthing/folders/notes.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{lib, ...}: {
|
||||
services.syncthing.folders."Notes" = {
|
||||
label = "Notes";
|
||||
path = lib.mkDefault "/var/lib/syncthing/Notes/";
|
||||
id = "4ggjz-5dyop";
|
||||
ignorePerms = true;
|
||||
enable = true;
|
||||
};
|
||||
}
|
9
services/syncthing/folders/pictures.nix
Normal file
9
services/syncthing/folders/pictures.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{lib, ...}: {
|
||||
services.syncthing.folders."Pictures" = {
|
||||
label = "Pictures";
|
||||
path = lib.mkDefault "/var/lib/syncthing/Pictures/";
|
||||
id = "ziuj8-rm6dn";
|
||||
ignorePerms = true;
|
||||
enable = true;
|
||||
};
|
||||
}
|
10
services/syncthing/folders/xochitl.nix
Normal file
10
services/syncthing/folders/xochitl.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{lib, ...}: {
|
||||
services.syncthing.folders."Xochitl" = {
|
||||
label = "Xochitl";
|
||||
path = lib.mkDefault "/var/lib/syncthing/Xochitl/";
|
||||
id = "dkcbx-kq7hl";
|
||||
type = "receiveonly";
|
||||
ignorePerms = true;
|
||||
enable = true;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue