From fa6302b58e11680e8ef36d0def6acb179393c0bc Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Wed, 28 Oct 2026 17:42:00 -0400 Subject: Seems to be working --- modules/main.nix | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'modules/main.nix') diff --git a/modules/main.nix b/modules/main.nix index 974f599..cd5262a 100644 --- a/modules/main.nix +++ b/modules/main.nix @@ -36,9 +36,35 @@ with builtins // lib; RSYNC="rsync -a --copy-links -v" $RSYNC "${config.koreader.basePackage}/" "$out/" - $RSYNC "${config._files}/" "$out/${config.koreaderPath}/" + $RSYNC "${config._files}/" "$out/${config.koreader.koreaderPath}/" ''; }; + finalPackageTar = mkOption { + type = types.path; + readOnly = true; + default = pkgs.runCommandLocal "tar" { nativeBuildInputs = [ pkgs.tar ]; } '' + cd "${config.koreader.finalPackage}" + tar cvf "$out" . + ''; + }; + deploy = mkOption { + type = types.package; + readOnly = true; + default = pkgs.writeShellApplication { + name = "deploy"; + runtimeInputs = [ pkgs.tar ]; + text = '' + DESTINATION="''${1-}" + + if [ -z "$DESTINATION" ]; then + echo "Must include a destination" + exit 1 + fi + + tar xvf "${config.koreader.finalPackageTar}" --directory "$DESTINATION" + ''; + }; + }; }; }; -- cgit v1.3.1