vesktop appimage instead of nixpkgs
This commit is contained in:
parent
583a1a1905
commit
081ffed1e1
49
modules/home/vesktop-appimage/default.nix
Normal file
49
modules/home/vesktop-appimage/default.nix
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf;
|
||||||
|
cfg = config.my-namespace.home.vesktop-appimage;
|
||||||
|
vesktopVersion = "1.6.1";
|
||||||
|
|
||||||
|
vesktopAppImage = pkgs.runCommand "vesktop-appimage" { } ''
|
||||||
|
cp ${pkgs.fetchurl {
|
||||||
|
url = "https://github.com/Vencord/Vesktop/releases/download/v${vesktopVersion}/Vesktop-${vesktopVersion}.AppImage";
|
||||||
|
sha256 = "sha256-zK098H7iiOEe5y5YhgsUCPYVQQPcsnZw6/6q6Nx7h+w=";
|
||||||
|
}} $out
|
||||||
|
chmod +x $out
|
||||||
|
'';
|
||||||
|
|
||||||
|
vesktopWrapped = pkgs.writeShellScriptBin "vesktop" ''
|
||||||
|
exec ${pkgs.appimage-run}/bin/appimage-run ${vesktopAppImage} "$@"
|
||||||
|
'';
|
||||||
|
|
||||||
|
vesktopIcon = pkgs.fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/Vencord/Vesktop/main/build/icon.svg";
|
||||||
|
sha256 = "sha256-fQ+dvbPIb4AFd9f7JqIt7+twJdEMQF9jTTwrk5p1vn8=";
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my-namespace.home.vesktop-appimage = {
|
||||||
|
enable = mkEnableOption "Install Vesktop (AppImage) with Vencord support";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
xdg.dataFile."icons/hicolor/scalable/apps/vesktop.svg".source = vesktopIcon;
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
pkgs.appimage-run
|
||||||
|
vesktopWrapped
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.desktopEntries.vesktop = {
|
||||||
|
name = "Vesktop";
|
||||||
|
comment = "Discord client with Vencord (AppImage)";
|
||||||
|
exec = "${vesktopWrapped}/bin/vesktop";
|
||||||
|
icon = "vesktop";
|
||||||
|
terminal = false;
|
||||||
|
type = "Application";
|
||||||
|
categories = [ "Network" "Chat" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user