chore: make use of ts injection

This commit is contained in:
Nydragon 2024-12-19 12:57:41 +01:00
parent 78e63a2044
commit 599a549540
Signed by: nydragon
SSH key fingerprint: SHA256:WcjW5NJPQ8Dx4uQDmoIlVPLWE27Od3fxoe0IUvuoPHE

View file

@ -9,11 +9,14 @@ in
clip = "wl-copy"; clip = "wl-copy";
}; };
functions = { functions = {
gitignore = "curl -sL https://www.gitignore.io/api/$argv"; gitignore = # fish
mv-bad-creation-date = '' "curl -sL https://www.gitignore.io/api/$argv";
mv-bad-creation-date = # fish
''
${getExe' pkgs.exiftool "exiftool"} -if 'not $CreateDate' -p '$FileName' "$PWD/$argv[1]" | xargs -I {} mv -i "$PWD/$argv[1]/{}" "$argv[2]" ${getExe' pkgs.exiftool "exiftool"} -if 'not $CreateDate' -p '$FileName' "$PWD/$argv[1]" | xargs -I {} mv -i "$PWD/$argv[1]/{}" "$argv[2]"
''; '';
rename-images = '' rename-images = # fish
''
set -f input "$PWD/$argv[1]" set -f input "$PWD/$argv[1]"
if not test -d $input if not test -d $input
@ -23,7 +26,8 @@ in
end end
''; '';
fish_prompt = builtins.readFile ./fish_prompt.fish; fish_prompt = builtins.readFile ./fish_prompt.fish;
revert = '' revert = # fish
''
env --chdir $HOME/.nixconf sudo nixos-rebuild switch --flake .#$(hostname) --rollback env --chdir $HOME/.nixconf sudo nixos-rebuild switch --flake .#$(hostname) --rollback
''; '';
}; };