mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-05-20 13:22:34 +02:00
@@ -49,10 +49,20 @@
|
||||
isCards = true;
|
||||
items = acc.pending;
|
||||
}
|
||||
++ [{isCards = false; folder = item;}];
|
||||
++ [
|
||||
{
|
||||
isCards = false;
|
||||
folder = item;
|
||||
}
|
||||
];
|
||||
pending = [];
|
||||
};
|
||||
result = lib.foldl' step {chunks = []; pending = [];} items;
|
||||
result =
|
||||
lib.foldl' step {
|
||||
chunks = [];
|
||||
pending = [];
|
||||
}
|
||||
items;
|
||||
chunks =
|
||||
result.chunks
|
||||
++ lib.optional (result.pending != []) {
|
||||
@@ -97,7 +107,12 @@
|
||||
isRoot = true;
|
||||
items = acc.pending;
|
||||
}
|
||||
++ [{isRoot = false; inherit item;}];
|
||||
++ [
|
||||
{
|
||||
isRoot = false;
|
||||
inherit item;
|
||||
}
|
||||
];
|
||||
pending = [];
|
||||
};
|
||||
result =
|
||||
@@ -125,11 +140,13 @@
|
||||
|
||||
# Recursively collect all leaf bookmarks with their full folder path
|
||||
collectBookmarks = prefix: items:
|
||||
lib.concatMapStrings (item:
|
||||
if item ? url
|
||||
then "${item.url} ${prefix}${item.name}\n"
|
||||
else collectBookmarks "${prefix}${item.name}/" item.bookmarks
|
||||
) items;
|
||||
lib.concatMapStrings (
|
||||
item:
|
||||
if item ? url
|
||||
then "${item.url} ${prefix}${item.name}\n"
|
||||
else collectBookmarks "${prefix}${item.name}/" item.bookmarks
|
||||
)
|
||||
items;
|
||||
|
||||
publicBookmarks =
|
||||
pkgs.writeText "qutebrowser-public-bookmarks"
|
||||
@@ -475,10 +492,16 @@ in {
|
||||
</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
|
||||
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";
|
||||
url = "https://github.com";
|
||||
}
|
||||
{
|
||||
name = "Feedly";
|
||||
url = "https://feedly.com";
|
||||
}
|
||||
]
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
name = "Startpage Config";
|
||||
url = "https://www.startpage.com/do/mypage.pl?prfe=45d331deb05471d659dba933e7400df51d952bb103da6f6125c0e769a6be1d65610456a479f495ceeee7e97311cf227d7c1bb198de0ceeb193d8cddf9c455c19a409cc35c3e3f542ee27bd7cecd3";
|
||||
}
|
||||
{
|
||||
name = "Feedly";
|
||||
url = "https://feedly.com";
|
||||
}
|
||||
{
|
||||
name = "MyNixOS";
|
||||
url = "https://mynixos.com";
|
||||
|
||||
Reference in New Issue
Block a user