feat(syncthing): Device sydpc
This commit is contained in:
@@ -21,6 +21,10 @@ in {
|
||||
"Q5B6LIV-5HQMWWV-XFQL5IT-PHP7PVE-XFWUVHK-F6WJ42C-OPMR4M7-GFNK3AG";
|
||||
"deertopia".id =
|
||||
"OO6XGGQ-SORH6XW-YEMN3T3-CSW5QOO-2IRB2QE-NZOL6JE-RAV36GS-WZXXLQV";
|
||||
"nixos-testbed".id =
|
||||
"BO3AESA-LBKMZW7-QFE7NTT-GF62DOA-PYUACYU-HNTNYI5-EMF6PAN-TR6YHAL";
|
||||
"sydpc".id =
|
||||
"XROSJRC-SLAAOTG-L3HQ5TT-WAKL5PJ-QAIFJEY-FUG5AAO-5ACBTA3-MGQQFQI";
|
||||
};
|
||||
readOnly = true;
|
||||
description = ''
|
||||
@@ -66,6 +70,8 @@ in {
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
settings = {
|
||||
gui = {
|
||||
# TODO: Figure out how to read credentials from a file.
|
||||
@@ -73,8 +79,6 @@ in {
|
||||
user = "lain";
|
||||
password = "my-awesome-password";
|
||||
};
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
devices =
|
||||
lib.filterAttrs
|
||||
(k: _v: builtins.elem k cfg.includeDevices)
|
||||
|
||||
@@ -4,26 +4,28 @@ let cfg = config.sydnix.deertopia.syncthing;
|
||||
in {
|
||||
options.sydnix.deertopia.syncthing.enable =
|
||||
lib.mkEnableOption "Syncthing, à la Deertopia";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
sydnix.syncthing = {
|
||||
enable = true;
|
||||
includeDevices = [
|
||||
"guix-rebound"
|
||||
"sydpc"
|
||||
"nixos-testbed"
|
||||
];
|
||||
directories = {
|
||||
"Music" = {
|
||||
path = "/persist/vault/jellyfin/Music";
|
||||
devices = [ "guix-rebound" ];
|
||||
ignorePerms = true;
|
||||
devices = [
|
||||
"sydpc"
|
||||
];
|
||||
};
|
||||
"org" = {
|
||||
path = "/persist/deertopia.net/dav/org";
|
||||
devices = [
|
||||
"guix-rebound"
|
||||
"nixos-testbed"
|
||||
];
|
||||
ignorePerms = true;
|
||||
devices = [
|
||||
"sydpc"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -23,6 +23,8 @@ in {
|
||||
"OO6XGGQ-SORH6XW-YEMN3T3-CSW5QOO-2IRB2QE-NZOL6JE-RAV36GS-WZXXLQV";
|
||||
"nixos-testbed".id =
|
||||
"BO3AESA-LBKMZW7-QFE7NTT-GF62DOA-PYUACYU-HNTNYI5-EMF6PAN-TR6YHAL";
|
||||
"sydpc".id =
|
||||
"XROSJRC-SLAAOTG-L3HQ5TT-WAKL5PJ-QAIFJEY-FUG5AAO-5ACBTA3-MGQQFQI";
|
||||
};
|
||||
readOnly = true;
|
||||
description = ''
|
||||
@@ -50,6 +52,8 @@ in {
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
openDefaultPorts = true;
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
settings = {
|
||||
gui = {
|
||||
# TODO: Figure out how to read credentials from a file.
|
||||
@@ -57,8 +61,6 @@ in {
|
||||
user = "lain";
|
||||
password = "my-awesome-password";
|
||||
};
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
devices =
|
||||
lib.filterAttrs
|
||||
(k: _v: builtins.elem k cfg.includeDevices)
|
||||
|
||||
Reference in New Issue
Block a user