31 lines
1.5 KiB
Nix
31 lines
1.5 KiB
Nix
{ pkgs, lib, ... }:
|
|
# Categories: https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry
|
|
let
|
|
cmd = link: "${pkgs.google-chrome}/bin/google-chrome-stable --app=${link}";
|
|
links = [
|
|
{ desktopName = "Google Calendar"; link = "https://google.com/calendar"; categories = [ "Calendar" "Office" ]; }
|
|
{ desktopName = "Google Keep"; link = "https://keep.google.com"; categories = [ "Office" ]; }
|
|
{ desktopName = "Monkeytype"; link = "https://monkeytype.com/"; }
|
|
{ desktopName = "Netflix"; link = "https://www.netflix.com"; categories = [ "AudioVideo" ]; }
|
|
{ desktopName = "Notion"; link = "https://notion.so"; categories = [ "Office" ]; }
|
|
{ desktopName = "Prime Video"; link = "https://primevideo.com"; categories = [ "AudioVideo" ]; }
|
|
{ desktopName = "Protonmail"; link = "https://mail.protonmail.com"; categories = [ "Office" ]; }
|
|
{ desktopName = "Twitch"; link = "https://www.twitch.tv"; categories = [ "AudioVideo" ]; }
|
|
{ desktopName = "WhatsApp"; link = "https://web.whatsapp.com/"; }
|
|
{ desktopName = "YouTube"; link = "https://www.youtube.com"; categories = [ "AudioVideo" ]; }
|
|
];
|
|
webAppBuilder =
|
|
{ desktopName
|
|
, name ? builtins.replaceStrings [ " " ] [ "_" ] desktopName
|
|
, link
|
|
, icon ? lib.toLower name
|
|
, comment ? null
|
|
, categories ? [ "Network" ]
|
|
}: pkgs.makeDesktopItem {
|
|
inherit name icon desktopName comment categories;
|
|
exec = cmd link;
|
|
};
|
|
in
|
|
{
|
|
home.packages = map webAppBuilder links;
|
|
}
|