From 8d08b321b3810a774ec9500e05a9daa64c676684 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 8 Aug 2025 02:13:15 +0100 Subject: [PATCH] Refactor `heightwidth` --- modules2/hosts/t480/heightwidth.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modules2/hosts/t480/heightwidth.nix b/modules2/hosts/t480/heightwidth.nix index c63171a6..9eb627e1 100644 --- a/modules2/hosts/t480/heightwidth.nix +++ b/modules2/hosts/t480/heightwidth.nix @@ -1,17 +1,16 @@ +{ inputs, ... }: + { - flake.modules.nixos.pc = + flake.modules.homeManager.base = { pkgs, ... }: { - environment.systemPackages = [ - (pkgs.writeShellApplication { + home.packages = [ + (pkgs.writeShellApplication rec { 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" - ''; + text = builtins.readFile "${inputs.rwxrob-dot}/scripts/${name}"; }) ]; };