freetube on Wayland

This commit is contained in:
Daniel Langbein 2023-10-18 17:47:26 +02:00
parent 278d27ee4e
commit 86b017ed4a
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002
6 changed files with 36 additions and 1 deletions

View File

@ -20,6 +20,7 @@
#../../modules/programs.nix
#../../modules/boxes.nix
#../../modules/freetube.nix
#../../modules/signal-desktop.nix
#../../modules/element-desktop.nix
#../../modules/tor-browser.nix

View File

@ -19,6 +19,7 @@
../../modules/programs.nix
#../../modules/boxes.nix
../../modules/freetube.nix
../../modules/signal-desktop.nix
../../modules/element-desktop.nix
../../modules/tor-browser.nix

View File

@ -19,6 +19,7 @@
../../modules/programs.nix
../../modules/boxes.nix
../../modules/freetube.nix
../../modules/signal-desktop.nix
../../modules/element-desktop.nix
../../modules/tor-browser.nix

View File

@ -20,6 +20,7 @@
#../../modules/programs.nix
#../../modules/boxes.nix
#../../modules/freetube.nix
#../../modules/signal-desktop.nix
#../../modules/element-desktop.nix
#../../modules/tor-browser.nix

32
modules/freetube.nix Normal file
View File

@ -0,0 +1,32 @@
{ config, pkgs, lib, ... }:
{
users.users.yoda = {
packages = with pkgs; [
freetube # YouTube client.
];
};
# Manually enable Wayland support.
# Method1: https://www.reddit.com/r/NixOS/comments/scf0ui/comment/hu6xfn8/?utm_source=share&utm_medium=web2x&context=3
# Method2: https://github.com/NixOS/nixpkgs/issues/222043#issuecomment-1493457041
nixpkgs.overlays = lib.mkIf (config.services.xserver.displayManager.gdm.wayland) [
(final: prev: {
freetube = prev.freetube.overrideAttrs (oldAttrs: {
postInstall = (oldAttrs.postInstall or "") + ''
substituteInPlace $out/share/applications/freetube.desktop \
--replace "Exec=freetube" "Exec=freetube --enable-features=UseOzonePlatform --ozone-platform=wayland"
'';
});
})
# (self: super: {
# freetube = super.freetube.overrideAttrs (old: {
# preFixup = (old.preFixup or "") + ''
# gappsWrapperArgs+=(
# --add-flags "--enable-features=UseOzonePlatform"
# --add-flags "--ozone-platform=wayland"
# )
# '';
# });
# })
];
}

View File

@ -34,7 +34,6 @@
gnome-secrets # Password manager (Native Wayland client)
#keepassxc # Password manager
freetube # YouTube client
tartube-yt-dlp # Video downloader (front-end for yt-dlp)
joplin-desktop # Markdown notes
rnote # Handwritten notes