diff options
| author | Baitinq <[email protected]> | 2025-08-30 13:13:21 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-08-30 13:13:21 +0200 |
| commit | 33333e3b787ec1f487d5c052fafeb8097f9e45c2 (patch) | |
| tree | eb21b774e86149e0f42863e6b9e3e0d1d009b882 /overlays/base | |
| parent | Home: Packages: Add claude-squad (diff) | |
| download | nixos-config-33333e3b787ec1f487d5c052fafeb8097f9e45c2.tar.gz nixos-config-33333e3b787ec1f487d5c052fafeb8097f9e45c2.tar.bz2 nixos-config-33333e3b787ec1f487d5c052fafeb8097f9e45c2.zip | |
Overlays: base: fix git-crypt with workspaces
Diffstat (limited to 'overlays/base')
| -rw-r--r-- | overlays/base/default.nix | 4 | ||||
| -rw-r--r-- | overlays/base/patches/git-crypt-worktrees.patch | 25 |
2 files changed, 29 insertions, 0 deletions
diff --git a/overlays/base/default.nix b/overlays/base/default.nix index 9d21785..11a9c8a 100644 --- a/overlays/base/default.nix +++ b/overlays/base/default.nix @@ -67,6 +67,10 @@ final: prev: { scripts = [prev.mpvScripts.mpris]; }; + git-crypt = prev.git-crypt.overrideAttrs (old: { + patches = (old.patches or []) ++ [./patches/git-crypt-worktrees.patch]; + }); + emacs = prev.symlinkJoin { inherit (prev.emacs) name; inherit (prev.emacs) version; diff --git a/overlays/base/patches/git-crypt-worktrees.patch b/overlays/base/patches/git-crypt-worktrees.patch new file mode 100644 index 0000000..908dad8 --- /dev/null +++ b/overlays/base/patches/git-crypt-worktrees.patch @@ -0,0 +1,25 @@ +diff --git a/commands.cpp b/commands.cpp +index 81c401d..f825d7b 100644 +--- a/commands.cpp ++++ b/commands.cpp +@@ -243,17 +243,17 @@ static std::string get_internal_state_path () + std::vector<std::string> command; + command.push_back("git"); + command.push_back("rev-parse"); +- command.push_back("--git-dir"); ++ command.push_back("--git-path"); ++ command.push_back("common/git-crypt"); + + std::stringstream output; + + if (!successful_exit(exec_command(command, output))) { +- throw Error("'git rev-parse --git-dir' failed - is this a Git repository?"); ++ throw Error("'git rev-parse --git-path common/git-crypt' failed - is this a Git repository?"); + } + + std::string path; + std::getline(output, path); +- path += "/git-crypt"; + + return path; + } |