Compare commits

...

2 Commits

Author SHA1 Message Date
Lukas Cech
25e93ab45c Formatting 2025-02-03 13:10:05 +01:00
Lukas Cech
d16b8262c9 Fix klogs 2025-02-03 13:09:50 +01:00
2 changed files with 18 additions and 16 deletions

View File

@ -138,24 +138,26 @@ in
git-sync-remote = lib.mkDefault "git remote update origin --prune";
klogs = lib.mkDefault "${pkgs.writeShellScript "klogs" ''
ctx="$1"
namespace="$2"
label="$3"
echo=${pkgs.coreutils}/bin/echo
ctx="$1"
shift
namespace="$1"
shift
label="$1"
shift
if [[ "$ctx" == "" || "$namespace" == "" || "$label" == "" ]]; then
echo "Usage: klogs context namespace label"
echo "${"\n"}Contexts:"
kubectl config get-contexts -o name | sed 's/^/\t/g'
if [[ "$ctx" == "" || "$namespace" == "" || "$label" == "" ]]; then
echo "Usage: klogs context namespace label"
echo "${"\n"}Contexts:"
kubectl config get-contexts -o name | sed 's/^/\t/g'
echo "Label examples:"
echo "${"\t"}app.kubernetes.io/name=..."
echo "${"\t"}eks.amazonaws.com/component=..."
exit 1
fi
echo "Label examples:"
echo "${"\t"}app.kubernetes.io/name=..."
echo "${"\t"}eks.amazonaws.com/component=..."
exit 1
fi
kubectl --context "$ctx" logs -f -n "$namespace" -l "$label"
''}";
kubectl --context "$ctx" logs -f -n "$namespace" -l "$label" $@
''}";
nixfix = lib.mkDefault "nix fmt ./**/*.nix";

View File

@ -140,7 +140,7 @@ in
Program = "${pkgs.writeShellScript "keepass-sync" ''
${pkgs.coreutils}/bin/cp "${homedir}/storage/.macshare/.secret/arnie.kdbx" "${homedir}/.secret/arnie.kdbx"
''}";
ProgramArguments = [];
ProgramArguments = [ ];
StartInterval = 60 * 10;
StandardErrorPath = "/var/log/keepass-sync.error.log";
StandardOutPath = "/var/log/keepass-sync.out.log";