mirror of
https://github.com/abusoww/tuxmate.git
synced 2026-04-17 15:53:24 +02:00
fix: Fixed double nixpkgs. Added nix packages for Stremio and Oh My Zsh
This commit is contained in:
@@ -208,8 +208,9 @@ export function useLinuxInit(): UseLinuxInitReturn {
|
||||
|
||||
// Handle special cases for Nix and Snap
|
||||
if (selectedDistro === 'nix') {
|
||||
// Nix needs nixpkgs. prefix for each package
|
||||
return `${distro.installPrefix} ${packageNames.map(p => `nixpkgs.${p}`).join(' ')}`;
|
||||
// installPrefix already ends with 'nixpkgs.' so just join packages with ' nixpkgs.'
|
||||
const filteredPkgs = packageNames.filter(p => p.trim());
|
||||
return `${distro.installPrefix}${filteredPkgs.join(' nixpkgs.')}`;
|
||||
}
|
||||
|
||||
if (selectedDistro === 'snap') {
|
||||
|
||||
@@ -129,7 +129,7 @@ export const apps: AppData[] = [
|
||||
|
||||
// TERMINAL
|
||||
{ id: 'zsh', name: 'Zsh', description: 'Powerful shell with advanced completion features', category: 'Terminal', iconUrl: si('zsh', '#F15A24'), targets: { ubuntu: 'zsh', debian: 'zsh', arch: 'zsh', fedora: 'zsh', opensuse: 'zsh', nix: 'zsh', homebrew: 'zsh' }, unavailableReason: 'Zsh is a system shell and not available via Flatpak or Snap.' },
|
||||
{ id: 'ohmyzsh', name: 'Oh My Zsh', description: 'Zsh configuration framework with plugins/themes', category: 'Terminal', iconUrl: si('zsh', '#F15A24'), targets: {}, unavailableReason: 'Install via `sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"`. See [ohmyzsh wiki](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH).' },
|
||||
{ id: 'ohmyzsh', name: 'Oh My Zsh', description: 'Zsh configuration framework with plugins/themes', category: 'Terminal', iconUrl: si('zsh', '#F15A24'), targets: { nix: 'oh-my-zsh' }, unavailableReason: 'Install via `sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"`. See [ohmyzsh wiki](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH).' },
|
||||
{ id: 'fish', name: 'Fish', description: 'Smart and user-friendly interactive shell', category: 'Terminal', iconUrl: vs('file-type-shell'), targets: { ubuntu: 'fish', debian: 'fish', arch: 'fish', fedora: 'fish', opensuse: 'fish', nix: 'fish', homebrew: 'fish' }, unavailableReason: 'Fish is a system shell and not available via Flatpak or Snap.' },
|
||||
{ id: 'starship', name: 'Starship', description: 'Cross-shell customizable command prompt', category: 'Terminal', iconUrl: si('starship', '#DD0B78'), targets: { ubuntu: 'starship', debian: 'starship', arch: 'starship', opensuse: 'starship', nix: 'starship', homebrew: 'starship' }, unavailableReason: 'Not in Fedora repos. Install via `curl -sS https://starship.rs/install.sh | sh` or see [starship.rs](https://starship.rs/).' },
|
||||
{ id: 'alacritty', name: 'Alacritty', description: 'Blazing fast GPU-accelerated terminal emulator', category: 'Terminal', iconUrl: si('alacritty', '#F46D01'), targets: { ubuntu: 'alacritty', debian: 'alacritty', arch: 'alacritty', fedora: 'alacritty', opensuse: 'alacritty', nix: 'alacritty', snap: 'alacritty --classic', homebrew: '--cask alacritty' }, unavailableReason: 'Alacritty is not available as a Flatpak package.' },
|
||||
@@ -174,7 +174,7 @@ export const apps: AppData[] = [
|
||||
{ id: 'obs', name: 'OBS Studio', description: 'Industry-standard streaming and recording software', category: 'Media', iconUrl: si('obsstudio', '#A3A3A3'), targets: { ubuntu: 'obs-studio', debian: 'obs-studio', arch: 'obs-studio', fedora: 'obs-studio', opensuse: 'obs-studio', nix: 'obs-studio', flatpak: 'com.obsproject.Studio', snap: 'obs-studio', homebrew: '--cask obs' } },
|
||||
{ id: 'ffmpeg', name: 'FFmpeg', description: 'Swiss army knife of video/audio processing', category: 'Media', iconUrl: si('ffmpeg', '#007808'), targets: { ubuntu: 'ffmpeg', debian: 'ffmpeg', arch: 'ffmpeg', fedora: 'ffmpeg', opensuse: 'ffmpeg', nix: 'ffmpeg', homebrew: 'ffmpeg' }, unavailableReason: 'FFmpeg is a system library and not available via Flatpak or Snap.' },
|
||||
{ id: 'handbrake', name: 'HandBrake', description: 'Open-source video transcoder for any format', category: 'Media', iconUrl: mdi('video-vintage', '#F83262'), targets: { ubuntu: 'handbrake', debian: 'handbrake', arch: 'handbrake', opensuse: 'handbrake', nix: 'handbrake', flatpak: 'fr.handbrake.ghb', snap: 'handbrake-jz', homebrew: 'handbrake' }, unavailableReason: 'HandBrake is not in official Fedora repos. Use [Flatpak](https://flathub.org/apps/details/fr.handbrake.ghb) or [Snap](https://snapcraft.io/handbrake-jz) instead.' },
|
||||
{ id: 'stremio', name: 'Stremio', description: 'Modern media center with streaming addons', category: 'Media', iconUrl: si('stremio', '#8A5AAB'), targets: { arch: 'stremio', flatpak: 'com.stremio.Stremio', homebrew: '--cask stremio' }, unavailableReason: 'Only available via [AUR](https://aur.archlinux.org/packages/stremio) or [Flatpak](https://flathub.org/apps/details/com.stremio.Stremio), see [stremio.com/downloads](https://www.stremio.com/downloads) for more info.' },
|
||||
{ id: 'stremio', name: 'Stremio', description: 'Modern media center with streaming addons', category: 'Media', iconUrl: si('stremio', '#8A5AAB'), targets: { arch: 'stremio', nix: 'stremio', flatpak: 'com.stremio.Stremio', homebrew: '--cask stremio' }, unavailableReason: 'Only available via [AUR](https://aur.archlinux.org/packages/stremio) or [Flatpak](https://flathub.org/apps/details/com.stremio.Stremio), see [stremio.com/downloads](https://www.stremio.com/downloads) for more info.' },
|
||||
{ id: 'kodi', name: 'Kodi', description: 'Open-source home theater and media center', category: 'Media', iconUrl: si('kodi', '#17B2E7'), targets: { ubuntu: 'kodi', debian: 'kodi', arch: 'kodi', fedora: 'kodi', opensuse: 'kodi', nix: 'kodi', flatpak: 'tv.kodi.Kodi', snap: 'kodi', homebrew: '--cask kodi' } },
|
||||
{ id: 'haruna', name: 'Haruna', description: 'Modern Qt/QML video player powered by mpv', category: 'Media', iconUrl: si('hevy', '#A3A3A3'), targets: { ubuntu: 'haruna', debian: 'haruna', arch: 'haruna', fedora: 'haruna', opensuse: 'haruna', nix: 'haruna', flatpak: 'org.kde.haruna', snap: 'haruna' } },
|
||||
{ id: 'shortwave', name: 'Shortwave', description: 'Listen to internet radio stations worldwide', category: 'Media', iconUrl: si('playerfm', '#478ECC'), targets: { ubuntu: 'shortwave', debian: 'shortwave', arch: 'shortwave', fedora: 'shortwave', opensuse: 'shortwave', nix: 'shortwave', flatpak: 'de.haeckerfelix.Shortwave', snap: 'shortwave', homebrew: '--cask shortwave' } },
|
||||
|
||||
@@ -58,7 +58,7 @@ export function generateSimpleCommand(selectedAppIds: Set<string>, distroId: Dis
|
||||
case 'arch': return `yay -S --needed --noconfirm ${pkgList}`;
|
||||
case 'fedora': return `sudo dnf install -y ${pkgList}`;
|
||||
case 'opensuse': return `sudo zypper install -y ${pkgList}`;
|
||||
case 'nix': return `nix-env -iA ${packages.map(p => `nixpkgs.${p.pkg}`).join(' ')}`;
|
||||
case 'nix': return `nix-env -iA ${packages.filter(p => p.pkg.trim()).map(p => `nixpkgs.${p.pkg.trim()}`).join(' ')}`;
|
||||
case 'flatpak': return `flatpak install flathub -y ${pkgList}`;
|
||||
case 'snap':
|
||||
if (packages.length === 1) return `sudo snap install ${pkgList}`;
|
||||
|
||||
@@ -46,7 +46,7 @@ echo
|
||||
info "Installing $TOTAL packages"
|
||||
echo
|
||||
|
||||
${packages.map(({ app, pkg }) => `install_pkg "${escapeShellString(app.name)}" "${pkg}"`).join('\n')}
|
||||
${packages.filter(p => p.pkg.trim()).map(({ app, pkg }) => `install_pkg "${escapeShellString(app.name)}" "${pkg.trim()}"`).join('\n')}
|
||||
|
||||
print_summary
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user