move feedly

Signed-off-by: Hadi <hadi@example.com>
This commit is contained in:
Hadi
2026-04-22 10:33:10 +02:00
parent c3f86c9831
commit 96b5d5e671
3 changed files with 38 additions and 15 deletions
+34 -11
View File
@@ -49,10 +49,20 @@
isCards = true; isCards = true;
items = acc.pending; items = acc.pending;
} }
++ [{isCards = false; folder = item;}]; ++ [
{
isCards = false;
folder = item;
}
];
pending = []; pending = [];
}; };
result = lib.foldl' step {chunks = []; pending = [];} items; result =
lib.foldl' step {
chunks = [];
pending = [];
}
items;
chunks = chunks =
result.chunks result.chunks
++ lib.optional (result.pending != []) { ++ lib.optional (result.pending != []) {
@@ -97,7 +107,12 @@
isRoot = true; isRoot = true;
items = acc.pending; items = acc.pending;
} }
++ [{isRoot = false; inherit item;}]; ++ [
{
isRoot = false;
inherit item;
}
];
pending = []; pending = [];
}; };
result = result =
@@ -125,11 +140,13 @@
# Recursively collect all leaf bookmarks with their full folder path # Recursively collect all leaf bookmarks with their full folder path
collectBookmarks = prefix: items: collectBookmarks = prefix: items:
lib.concatMapStrings (item: lib.concatMapStrings (
if item ? url item:
then "${item.url} ${prefix}${item.name}\n" if item ? url
else collectBookmarks "${prefix}${item.name}/" item.bookmarks then "${item.url} ${prefix}${item.name}\n"
) items; else collectBookmarks "${prefix}${item.name}/" item.bookmarks
)
items;
publicBookmarks = publicBookmarks =
pkgs.writeText "qutebrowser-public-bookmarks" pkgs.writeText "qutebrowser-public-bookmarks"
@@ -475,10 +492,16 @@ in {
</html> </html>
''; '';
home.activation.qutebrowserBookmarks = lib.hm.dag.entryAfter ["setupSecrets" "writeBoundary"] '' home.activation.qutebrowserBookmarks = lib.hm.dag.entryAfter ["writeBoundary"] ''
mkdir -p ${config.home.homeDirectory}/.config/qutebrowser/bookmarks mkdir -p ${config.home.homeDirectory}/.config/qutebrowser/bookmarks
cat ${publicBookmarks} ${lib.optionalString (privateBookmarksPath != null) ''"${privateBookmarksPath}"''} \ {
> ${config.home.homeDirectory}/.config/qutebrowser/bookmarks/urls cat ${publicBookmarks}
${lib.optionalString (privateBookmarksPath != null) ''
if [ -f "${privateBookmarksPath}" ]; then
cat "${privateBookmarksPath}"
fi
''}
} > ${config.home.homeDirectory}/.config/qutebrowser/bookmarks/urls
''; '';
}; };
} }
@@ -19,8 +19,4 @@
name = "Github"; name = "Github";
url = "https://github.com"; url = "https://github.com";
} }
{
name = "Feedly";
url = "https://feedly.com";
}
] ]
@@ -29,6 +29,10 @@
name = "Startpage Config"; name = "Startpage Config";
url = "https://www.startpage.com/do/mypage.pl?prfe=45d331deb05471d659dba933e7400df51d952bb103da6f6125c0e769a6be1d65610456a479f495ceeee7e97311cf227d7c1bb198de0ceeb193d8cddf9c455c19a409cc35c3e3f542ee27bd7cecd3"; url = "https://www.startpage.com/do/mypage.pl?prfe=45d331deb05471d659dba933e7400df51d952bb103da6f6125c0e769a6be1d65610456a479f495ceeee7e97311cf227d7c1bb198de0ceeb193d8cddf9c455c19a409cc35c3e3f542ee27bd7cecd3";
} }
{
name = "Feedly";
url = "https://feedly.com";
}
{ {
name = "MyNixOS"; name = "MyNixOS";
url = "https://mynixos.com"; url = "https://mynixos.com";