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