From 2c13658e8990659d962d9653710c7146aaaa8da5 Mon Sep 17 00:00:00 2001 From: GarandPLG Date: Wed, 27 May 2026 01:13:23 +0200 Subject: [PATCH] Add Losslesscut AppImage and update host configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable the Losslesscut AppImage on the Garand‑Desktop host while keeping it disabled on the laptop and default hosts. Add opencode to the laptop home configuration and explicitly disable ollama. Add a new losslesscut AppImage package definition and register it in the AppImage collection. Extend the substituter list with noctalia.cachix.org and add its trusted public key. --- hosts/Garand-Desktop/system-modules.nix | 1 + hosts/Garand-Laptop/home-modules.nix | 2 + hosts/Garand-Laptop/system-modules.nix | 1 + hosts/default/system-modules.nix | 1 + modules/core/packages/appimages/default.nix | 1 + .../core/packages/appimages/losslesscut.nix | 39 +++++++++++++++++++ modules/core/packages/packages.nix | 18 +++++---- modules/core/system.nix | 10 ++++- 8 files changed, 63 insertions(+), 10 deletions(-) create mode 100644 modules/core/packages/appimages/losslesscut.nix diff --git a/hosts/Garand-Desktop/system-modules.nix b/hosts/Garand-Desktop/system-modules.nix index 100f4e9..31e640a 100644 --- a/hosts/Garand-Desktop/system-modules.nix +++ b/hosts/Garand-Desktop/system-modules.nix @@ -101,6 +101,7 @@ _: { pixieditor.enable = true; # Pixieditor: Universal editor for all your 2D needs plex.enable = true; # Plex: media player and server client jellyfin.enable = true; # Jellyfin: foss media player + appImages.losslesscut.enable = true; # Losslesscut: Swiss army knife of lossless video/audio editing /* Utilities / Misc diff --git a/hosts/Garand-Laptop/home-modules.nix b/hosts/Garand-Laptop/home-modules.nix index b5b0449..3179c77 100644 --- a/hosts/Garand-Laptop/home-modules.nix +++ b/hosts/Garand-Laptop/home-modules.nix @@ -7,6 +7,8 @@ _: { enable = true; # Zed Editor: a modern, high‑performance code editor remote-server.enable = false; # Remote Server: enable remote editing capabilities }; + opencode.enable = true; # OpenCode: terminal coding agent + ollama.enable = false; # Ollama: Local Llms /* Web browsers diff --git a/hosts/Garand-Laptop/system-modules.nix b/hosts/Garand-Laptop/system-modules.nix index a9d6d0e..db84ebe 100644 --- a/hosts/Garand-Laptop/system-modules.nix +++ b/hosts/Garand-Laptop/system-modules.nix @@ -101,6 +101,7 @@ _: { pixieditor.enable = true; # Pixieditor: Universal editor for all your 2D needs plex.enable = true; # Plex: media player and server client jellyfin.enable = true; # Jellyfin: foss media player + appImages.losslesscut.enable = false; # Losslesscut: Swiss army knife of lossless video/audio editing /* Utilities / Misc diff --git a/hosts/default/system-modules.nix b/hosts/default/system-modules.nix index 500c25e..5e5881b 100644 --- a/hosts/default/system-modules.nix +++ b/hosts/default/system-modules.nix @@ -101,6 +101,7 @@ _: { pixieditor.enable = false; # Pixieditor: Universal editor for all your 2D needs plex.enable = true; # Plex: media player and server client jellyfin.enable = true; # Jellyfin: foss media player + appImages.losslesscut.enable = false; # Losslesscut: Swiss army knife of lossless video/audio editing /* Utilities / Misc diff --git a/modules/core/packages/appimages/default.nix b/modules/core/packages/appimages/default.nix index fe9478d..f27688c 100644 --- a/modules/core/packages/appimages/default.nix +++ b/modules/core/packages/appimages/default.nix @@ -14,6 +14,7 @@ appImagePackages = { fluxer = pkgs.callPackage ./fluxer.nix {}; helium = pkgs.callPackage ./helium.nix {}; + losslesscut = pkgs.callPackage ./losslesscut.nix {}; }; in { imports = builtins.attrValues (builtins.mapAttrs mkAppImagePackage appImagePackages); diff --git a/modules/core/packages/appimages/losslesscut.nix b/modules/core/packages/appimages/losslesscut.nix new file mode 100644 index 0000000..1a7480f --- /dev/null +++ b/modules/core/packages/appimages/losslesscut.nix @@ -0,0 +1,39 @@ +{ + lib, + appimageTools, + fetchurl, +}: let + pname = "losslesscut"; + version = "3.68.0"; + + src = fetchurl { + url = "https://github.com/mifi/lossless-cut/releases/download/v${version}/LosslessCut-linux-x86_64.AppImage"; + sha256 = "sha256-/d+j1/XAQOzmx7S2bVUPar/Bx130CumbzOf2sY2sCzo="; + }; + appimageContents = appimageTools.extract {inherit pname version src;}; + + iconSize = "512x512"; +in + appimageTools.wrapType2 { + inherit pname version src; + + extraInstallCommands = '' + # mv $out/bin/${pname}-${version} $out/bin/${pname} + install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop + install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/${iconSize}/apps/${pname}.png \ + $out/share/icons/hicolor/${iconSize}/apps/${pname}.png + # substituteInPlace $out/share/applications/${pname}.desktop \ + # --replace-fail 'Exec=AppRun' 'Exec=${pname}' + ''; + + meta = with lib; { + description = "Lossless cut"; + homepage = "https://github.com/mifi/lossless-cut"; + license = licenses.gpl2Only; + platforms = ["x86_64-linux"]; + sourceProvenance = with lib.sourceTypes; [binaryNativeCode]; + maintainers = with lib.maintainers; [garand_plg]; + }; + } +# https://github.com/mifi/lossless-cut/releases/download/v3.68.0/LosslessCut-linux-x86_64.AppImage + diff --git a/modules/core/packages/packages.nix b/modules/core/packages/packages.nix index 2c3caf3..9b6f933 100644 --- a/modules/core/packages/packages.nix +++ b/modules/core/packages/packages.nix @@ -31,14 +31,16 @@ ttySolitaire = tty-solitaire; gimp = gimp; eyeOfGnome = eog; - kdenlive = kdePackages.kdenlive.overrideAttrs (old: { - postInstall = - (old.postInstall or "") - + '' - wrapProgram $out/bin/kdenlive \ - --set QT_SCALE_FACTOR 0.8 - ''; - }); + kdenlive = + kdePackages.kdenlive.overrideAttrs + (old: { + postInstall = + (old.postInstall or "") + + '' + wrapProgram $out/bin/kdenlive \ + --set QT_SCALE_FACTOR 0.8 + ''; + }); plex = [ ( plex-desktop.override { diff --git a/modules/core/system.nix b/modules/core/system.nix index 50e58f4..e381c47 100644 --- a/modules/core/system.nix +++ b/modules/core/system.nix @@ -12,8 +12,14 @@ "nix-command" "flakes" ]; - substituters = ["https://hyprland.cachix.org"]; - trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; + substituters = [ + "https://hyprland.cachix.org" + "https://noctalia.cachix.org" + ]; + trusted-public-keys = [ + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + "noctalia.cachix.org-1:pCOR47nnMEo5thcxNDtzWpOxNFQsBRglJzxWPp3dkU4=" + ]; }; }; time.timeZone = "Europe/Warsaw";