From a0a7c7f5180e10ef81ac96eefec89e80a5d04f19 Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Fri, 15 Dec 2023 18:39:20 +0800 Subject: [PATCH] home: scripts: screenshot: set screenshot directory --- .../device-type/desktop/home/scripts/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/users/guanranwang/nixos/profiles/device-type/desktop/home/scripts/default.nix b/users/guanranwang/nixos/profiles/device-type/desktop/home/scripts/default.nix index 3ae2df1..f1982eb 100644 --- a/users/guanranwang/nixos/profiles/device-type/desktop/home/scripts/default.nix +++ b/users/guanranwang/nixos/profiles/device-type/desktop/home/scripts/default.nix @@ -13,9 +13,12 @@ in { hash = "sha256-hT+S/rqOHUYnnFcSDFfQht4l1DGasz1L3wDHKUWLraA="; }; - "${binPATH}/screenshot".source = pkgs.fetchurl { - url = "https://raw.githubusercontent.com/nwg-piotr/nwg-shell/c29e8eb4658a2613fb221ead0b101c75f457bcaf/scripts/screenshot"; - hash = "sha256-Z/fWloz8pLHsvPTPOeBxnbMsGDRTY3G3l/uePQ3ZxjU="; + "${binPATH}/screenshot".source = pkgs.substitute { + src = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/nwg-piotr/nwg-shell/c29e8eb4658a2613fb221ead0b101c75f457bcaf/scripts/screenshot"; + hash = "sha256-Z/fWloz8pLHsvPTPOeBxnbMsGDRTY3G3l/uePQ3ZxjU="; + }; + replacements = ["--replace" "DIR=\${SCREENSHOT_DIR:=$HOME/Screenshots}" "DIR=$HOME/Pictures/Screenshots"]; # i dont like using an environment variable }; }; }