From 83f0daa6c54c26ad240c46722d3ad84f853f517a Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Mon, 2 Nov 2026 19:55:32 +0100 Subject: modules/*: Fix various name mistakes and other issues --- modules/common/soispha/hooks/default.nix | 17 ++++++++++++++++ .../common/soispha/hooks/scripts/sync-git-repo.sh | 23 ++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 modules/common/soispha/hooks/default.nix create mode 100755 modules/common/soispha/hooks/scripts/sync-git-repo.sh (limited to 'modules/common/soispha/hooks') diff --git a/modules/common/soispha/hooks/default.nix b/modules/common/soispha/hooks/default.nix new file mode 100644 index 00000000..5b694039 --- /dev/null +++ b/modules/common/soispha/hooks/default.nix @@ -0,0 +1,17 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see . +{ + pkgs, + lib, + config, +}: { + sync-git-repos = config.lib.taskwarrior.mkHook "on-add" [pkgs.git] ./scripts/sync-git-repo.sh; + sync-git-repos-mod = config.lib.taskwarrior.mkHook "on-modify" [pkgs.git] ./scripts/sync-git-repo.sh; +} diff --git a/modules/common/soispha/hooks/scripts/sync-git-repo.sh b/modules/common/soispha/hooks/scripts/sync-git-repo.sh new file mode 100755 index 00000000..fe0d0085 --- /dev/null +++ b/modules/common/soispha/hooks/scripts/sync-git-repo.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env sh + +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see . + +task_data="$(task _get rc.data.location)" +[ "$task_data" ] || die "Taskwarrior should have a location set" + +cd "$task_data" || die "(BUG?): Your data.location path is not accessable" + +[ -d ./.git/ ] || git init + +git add . +git commit --message="chore: Update" --no-gpg-sign + +# vim: ft=sh -- cgit v1.3.1