diff --git a/SwarselSystems.org b/SwarselSystems.org index e04006f..5f8b289 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -11328,6 +11328,7 @@ This is just a separate container for derivations defined in [[#h:64a5cc16-6b16- swarselzellij sshrm endme + git-replace rustdesk-vbc ]; @@ -18047,6 +18048,25 @@ Sometimes my DE crashes after putting it to suspend - to be precise, it happens #+end_src +*** git-replace + +This script allows for quick git replace of a string. + + +#+begin_src nix-ts :tangle pkgs/git-replace/default.nix + { name, writeShellApplication, git, gnugrep, findutils, ... }: + + writeShellApplication { + inherit name; + runtimeInputs = [ git gnugrep findutils ]; + text = '' + git grep -l "$1" | xargs sed -i "s/$1/$2/g" + ''; + } + + +#+end_src + ** Profiles :PROPERTIES: :CUSTOM_ID: h:f0f1c961-3e7a-47b8-99ab-1654bb45dffc diff --git a/modules/home/common/custom-packages.nix b/modules/home/common/custom-packages.nix index 414d24e..302ba29 100644 --- a/modules/home/common/custom-packages.nix +++ b/modules/home/common/custom-packages.nix @@ -30,6 +30,7 @@ swarselzellij sshrm endme + git-replace rustdesk-vbc ]; diff --git a/pkgs/git-replace/default.nix b/pkgs/git-replace/default.nix new file mode 100644 index 0000000..7c3e4b8 --- /dev/null +++ b/pkgs/git-replace/default.nix @@ -0,0 +1,9 @@ +{ name, writeShellApplication, git, gnugrep, findutils, ... }: + +writeShellApplication { + inherit name; + runtimeInputs = [ git gnugrep findutils ]; + text = '' + git grep -l "$1" | xargs sed -i "s/$1/$2/g" + ''; +}