From 9eb2c2d0d6199345d857b9bb9d8c6185434f6f87 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 17 Jan 2021 16:19:41 +0100 Subject: populate pass: make git optional again --- pkgs/populate/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/populate/default.nix b/pkgs/populate/default.nix index 476e653..589362d 100644 --- a/pkgs/populate/default.nix +++ b/pkgs/populate/default.nix @@ -126,14 +126,18 @@ let rel_name=''${rel_name%.gpg} pass_date=$( - ${git}/bin/git -C ${quote source.dir} log -1 --format=%aI "$gpg_path" + if test -e ${quote source.dir}/.git; then + ${git}/bin/git -C ${quote source.dir} log -1 --format=%aI "$gpg_path" + fi ) pass_name=${quote source.name}/$rel_name tmp_path=$tmp_dir/$rel_name ${coreutils}/bin/mkdir -p "$(${coreutils}/bin/dirname "$tmp_path")" PASSWORD_STORE_DIR=${quote source.dir} ${pass}/bin/pass show "$pass_name" > "$tmp_path" - ${coreutils}/bin/touch -d "$pass_date" "$tmp_path" + if [ -n "$pass_date" ]; then + ${coreutils}/bin/touch -d "$pass_date" "$tmp_path" + fi done if test -n "''${local_pass_info-}"; then -- cgit v1.2.3 From 438d3f87383958561d9198e1edb951053cbcb234 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 16 Feb 2021 17:12:05 +0100 Subject: populate pass: don't decrypt .gpg-id --- pkgs/populate/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/populate/default.nix b/pkgs/populate/default.nix index 589362d..517b12e 100644 --- a/pkgs/populate/default.nix +++ b/pkgs/populate/default.nix @@ -119,7 +119,7 @@ let rm -fR "$tmp_dir" } - ${findutils}/bin/find ${quote passPrefix} -type f -follow | + ${findutils}/bin/find ${quote passPrefix} -type f -follow ! -name .gpg-id | while read -r gpg_path; do rel_name=''${gpg_path#${quote passPrefix}} -- cgit v1.2.3 From 2ea0cdb99d3531849e8afdf0c668b55f1b4cc568 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 16 Feb 2021 17:13:33 +0100 Subject: README: better usecase for extraOptions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 67c9133..6648fa0 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ pkgs.krops.writeDeploy "deploy" { source = /* ... */; target = lib.mkTarget "user@host/path" // { extraOptions = [ - "-oLogLevel=DEBUG" + "-o" "LogLevel=DEBUG" ]; sudo = true; }; -- cgit v1.2.3