From 426edf6c84ef674d687502b00a65a2f5992c8c87 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 7 Aug 2025 17:50:54 +0100 Subject: [PATCH] Add heightwidth script --- modules2/hosts/t480/heightwidth.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 modules2/hosts/t480/heightwidth.nix diff --git a/modules2/hosts/t480/heightwidth.nix b/modules2/hosts/t480/heightwidth.nix new file mode 100644 index 00000000..c63171a6 --- /dev/null +++ b/modules2/hosts/t480/heightwidth.nix @@ -0,0 +1,18 @@ +{ + flake.modules.nixos.pc = + { pkgs, ... }: + { + environment.systemPackages = [ + (pkgs.writeShellApplication { + name = "heightwidth"; + + runtimeInputs = [ pkgs.ffmpeg ]; + + # https://github.com/rwxrob/dot/blob/main/scripts/heightwidth. + text = '' + ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of default=noprint_wrappers=1 "$1" + ''; + }) + ]; + }; +}