created mkWebApp and add yt music webapp
This commit is contained in:
parent
96f5c16e42
commit
da0eddf1a2
3 changed files with 32 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./home.nix ./programs.nix ./programs/wezterm.nix ];
|
imports = [ ./home.nix ./programs.nix ./programs ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
5
users/desktops/common/programs/default.nix
Normal file
5
users/desktops/common/programs/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./wezterm.nix ./webapps.nix ];
|
||||||
|
}
|
||||||
26
users/desktops/common/programs/webapps.nix
Normal file
26
users/desktops/common/programs/webapps.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
mkWebApp = webAppName: webAppLink: webAppIconLink: webAppIconHash:
|
||||||
|
let name = lib.strings.replaceStrings [ " " ] [ "" ] webAppName;
|
||||||
|
in pkgs.makeDesktopItem {
|
||||||
|
inherit name;
|
||||||
|
icon = pkgs.fetchurl {
|
||||||
|
url = webAppIconLink;
|
||||||
|
sha256 = webAppIconHash;
|
||||||
|
};
|
||||||
|
desktopName = webAppName;
|
||||||
|
categories = [ "Network" ];
|
||||||
|
startupNotify = true;
|
||||||
|
startupWMClass = "chrome-${
|
||||||
|
lib.strings.replaceStrings [ "https://" "/" ] [ "" "" ] webAppLink
|
||||||
|
}__-Default";
|
||||||
|
exec =
|
||||||
|
"${pkgs.ungoogled-chromium}/bin/chromium --no-first-run --no-default-browser-check --no-crash-upload --app=${webAppLink} --class=${name}";
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
home.packages = [
|
||||||
|
(mkWebApp "YT Music" "https://music.youtube.com"
|
||||||
|
"https://raw.githubusercontent.com/vinceliuice/Qogir-icon-theme/fff0c7f3747b9b9ddf94c6f997847d47896097c2/src/scalable/apps/youtube-music.svg"
|
||||||
|
"sha256-T+v2JOOW+nEwH/9W2PFOrw/315/bCoKHw01KNh2U8IE=")
|
||||||
|
];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue