syncthing: Export differently
This commit is contained in:
parent
984ef44672
commit
c9fc2ec685
2 changed files with 11 additions and 19 deletions
|
@ -158,6 +158,8 @@
|
|||
gimp
|
||||
inkscape
|
||||
libreoffice
|
||||
jellyfin-media-player # Does not prevent the screen from sleeping
|
||||
jellyfin-mpv-shim # No UI, needs remote
|
||||
|
||||
# data management
|
||||
freefilesync
|
||||
|
|
|
@ -45,7 +45,7 @@ in
|
|||
system.build.syncthingConfig = {
|
||||
folders = lib.trivial.pipe syncedFolders [
|
||||
(builtins.map (folder: {
|
||||
name = folder.name;
|
||||
name = "geoffrey_${folder.name}";
|
||||
value = folder;
|
||||
}))
|
||||
builtins.listToAttrs
|
||||
|
@ -66,26 +66,16 @@ in
|
|||
devices = lib.trivial.pipe syncingDevices [
|
||||
(builtins.map (device: {
|
||||
name = device.name;
|
||||
value = device;
|
||||
value = {
|
||||
inherit (device) syncthing;
|
||||
enabledFolders = lib.trivial.pipe device.folders [
|
||||
(lib.attrsets.filterAttrs (folderName: folder: folder.syncthing.enable))
|
||||
builtins.attrNames
|
||||
(builtins.map (folderName: "geoffrey_${folderName}"))
|
||||
];
|
||||
};
|
||||
}))
|
||||
builtins.listToAttrs
|
||||
(lib.attrsets.mapAttrs (
|
||||
deviceName: device:
|
||||
{
|
||||
folders = lib.trivial.pipe device.folders [
|
||||
(lib.attrsets.filterAttrs (folderName: folder: folder.syncthing.enable))
|
||||
(lib.attrsets.mapAttrs (folderName: folder: { syncthing.enable = true; }))
|
||||
];
|
||||
}
|
||||
//
|
||||
(lib.attrsets.filterAttrs (
|
||||
k: v:
|
||||
builtins.elem k [
|
||||
"syncthing"
|
||||
]
|
||||
))
|
||||
device
|
||||
))
|
||||
];
|
||||
};
|
||||
services.${service} = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue