Update modules + webapps

This commit is contained in:
Filippo Berto 2022-02-07 09:48:45 +01:00
parent f00fe93ec4
commit c996e57264
10 changed files with 54 additions and 130 deletions

View file

@ -3,9 +3,6 @@
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
nix-direnv = {
enable = true;
enableFlakes = true;
};
nix-direnv.enable = true;
};
}

View file

@ -225,18 +225,18 @@ in
key = "<c-n>";
effect = "<a-;>: insert-c-n<ret>";
}
{
mode = "normal";
docstring = "Search";
key = "/";
effect = "/(?i)";
}
{
mode = "normal";
docstring = "Reverse search";
key = "<a-/>";
effect = "<a-/>(?i)";
}
# {
# mode = "normal";
# docstring = "Search";
# key = "/";
# effect = "/(?i)";
# }
# {
# mode = "normal";
# docstring = "Reverse search";
# key = "<a-/>";
# effect = "<a-/>(?i)";
# }
];
hooks = with pkgs;
[

View file

@ -1,20 +0,0 @@
{ pkgs, ... }:
with pkgs;
let
cmd = "${google-chrome}/bin/google-chrome-stable --app=https://keep.google.com";
desktopItem = pkgs.makeDesktopItem
{
name = "Keep";
type = "Application";
exec = cmd;
icon = "keep";
desktopName = "Keep";
comment = "Google Keep note app";
categories = "Office;";
};
in
{
home.packages = [
desktopItem
];
}

View file

@ -1,21 +0,0 @@
{ pkgs, ... }:
with pkgs;
let
link = "https://notion.so";
cmd = "${google-chrome}/bin/google-chrome-stable --app=${link}";
desktopItem = pkgs.makeDesktopItem
{
name = "Notion";
type = "Application";
exec = cmd;
icon = "notion";
desktopName = "Notion";
comment = "Notion web client";
categories = "Office;";
};
in
{
home.packages = [
desktopItem
];
}

View file

@ -1,21 +0,0 @@
{ pkgs, ... }:
with pkgs;
let
link = "https://twitch.com";
cmd = "${google-chrome}/bin/google-chrome-stable --app=${link}";
desktopItem = pkgs.makeDesktopItem
{
name = "Twitch";
type = "Application";
exec = cmd;
icon = "twitch";
desktopName = "Twitch";
comment = "Twitch web client";
categories = "Office;";
};
in
{
home.packages = [
desktopItem
];
}

30
modules/webapp.nix Normal file
View file

@ -0,0 +1,30 @@
{ 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 = [
{ name = "YouTube"; link = "https://www.youtube.com"; categories = "AudioVideo"; }
{ name = "Twitch"; link = "https://www.twitch.tv"; icon = builtins.fetchurl "https://static.twitchcdn.net/assets/favicon-32-e29e246c157142c94346.png"; categories = "AudioVideo"; }
{ name = "Netflix"; link = "https://www.netflix.com"; categories = "AudioVideo"; }
{ name = "Prime Video"; link = "https://primevideo.com"; categories = "AudioVideo"; }
{ name = "Google Keep"; link = "https://keep.google.com"; categories = "Office"; }
{ name = "Google Calendar"; link = "https://google.com/calendar"; icon = "calendar"; categories = "Calendar;Office"; }
{ name = "Notion"; link = "https://notion.so"; categories = "Office"; }
{ name = "WhatsApp"; link = "https://web.whatsapp.com/"; }
];
webAppBuilder =
{ name
, link
, icon ? lib.toLower name
, desktopName ? name
, comment ? null
, categories ? "Network"
}: pkgs.makeDesktopItem {
inherit name icon desktopName comment categories;
type = "Application";
exec = cmd link;
};
in
{
home.packages = map webAppBuilder links;
}

View file

@ -1,21 +0,0 @@
{ pkgs, ... }:
with pkgs;
let
link = "https://web.whatsapp.com";
cmd = "${google-chrome}/bin/google-chrome-stable --app=${link}";
desktopItem = pkgs.makeDesktopItem
{
name = "Whatsapp";
type = "Application";
exec = cmd;
icon = "whatsapp";
desktopName = "Whatsapp";
comment = "Whatsapp web client";
categories = "Office;";
};
in
{
home.packages = [
desktopItem
];
}

View file

@ -1,21 +0,0 @@
{ pkgs, ... }:
with pkgs;
let
link = "https://youtube.com";
cmd = "${google-chrome}/bin/google-chrome-stable --app=${link}";
desktopItem = pkgs.makeDesktopItem
{
name = "YouTube";
type = "Application";
exec = cmd;
icon = "youtube";
desktopName = "YouTube";
comment = "YouTube web client";
categories = "Office;";
};
in
{
home.packages = [
desktopItem
];
}