mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-05-20 13:22:34 +02:00
@@ -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 (
|
||||||
|
item:
|
||||||
if item ? url
|
if item ? url
|
||||||
then "${item.url} ${prefix}${item.name}\n"
|
then "${item.url} ${prefix}${item.name}\n"
|
||||||
else collectBookmarks "${prefix}${item.name}/" item.bookmarks
|
else collectBookmarks "${prefix}${item.name}/" item.bookmarks
|
||||||
) items;
|
)
|
||||||
|
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";
|
||||||
|
|||||||
Reference in New Issue
Block a user