syncthing: starting abstractions
This commit is contained in:
parent
a9ec83c732
commit
52b1aa4450
@ -5,6 +5,19 @@
|
|||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
guiPort = 8384;
|
guiPort = 8384;
|
||||||
|
folders = {
|
||||||
|
Books = {
|
||||||
|
devices = ["mxp10" "fwminex" "vno1-oh2"];
|
||||||
|
id = "8lk0n-mm63y";
|
||||||
|
label = "Books";
|
||||||
|
};
|
||||||
|
M-Active = {
|
||||||
|
devices = ["mxp10" "fwminex" "vno1-oh2"];
|
||||||
|
id = "f6fma-unkxq";
|
||||||
|
label = "M-Active";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
options.mj.services.syncthing = with lib.types; {
|
options.mj.services.syncthing = with lib.types; {
|
||||||
enable = lib.mkEnableOption "Enable services syncthing settings";
|
enable = lib.mkEnableOption "Enable services syncthing settings";
|
||||||
@ -70,16 +83,8 @@ in {
|
|||||||
id = "wslmq-fyw4w";
|
id = "wslmq-fyw4w";
|
||||||
label = "mykolo";
|
label = "mykolo";
|
||||||
};
|
};
|
||||||
"${config.services.syncthing.dataDir}/annex2/Books" = {
|
"${config.services.syncthing.dataDir}/annex2/Books" = folders.Books;
|
||||||
devices = ["mxp10" "fwminex"];
|
"${config.services.syncthing.dataDir}/annex2/M-Active" = folders.M-Active;
|
||||||
id = "8lk0n-mm63y";
|
|
||||||
label = "Books";
|
|
||||||
};
|
|
||||||
"${config.services.syncthing.dataDir}/annex2/M-Active" = {
|
|
||||||
devices = ["mxp10" "fwminex"];
|
|
||||||
id = "f6fma-unkxq";
|
|
||||||
label = "M-Active";
|
|
||||||
};
|
|
||||||
"${config.services.syncthing.dataDir}/annex2/M-Camera" = {
|
"${config.services.syncthing.dataDir}/annex2/M-Camera" = {
|
||||||
devices = ["mxp10" "fwminex"];
|
devices = ["mxp10" "fwminex"];
|
||||||
id = "pixel_xl_dtm3-photos";
|
id = "pixel_xl_dtm3-photos";
|
||||||
@ -129,11 +134,8 @@ in {
|
|||||||
)
|
)
|
||||||
// (
|
// (
|
||||||
lib.optionalAttrs (config.networking.hostName == "fwminex") {
|
lib.optionalAttrs (config.networking.hostName == "fwminex") {
|
||||||
"/home/motiejus/Books" = {
|
"/home/motiejus/Books" = folders.Books;
|
||||||
devices = ["mxp10" "vno1-oh2" "fwminex"];
|
"/home/motiejus/M-Active" = folders.M-Active;
|
||||||
id = "gqrtz-prx9h";
|
|
||||||
label = "Books";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user