1
0
Fork 0

chore: Use fancy TS injections in some files

This commit is contained in:
Daniel Kempkens 2023-10-01 22:56:08 +02:00
parent a183f5252c
commit 35579f7f93
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
5 changed files with 14 additions and 14 deletions

View file

@ -88,7 +88,7 @@
lastAppsFile = "${config.xdg.stateHome}/nix/.apps"; lastAppsFile = "${config.xdg.stateHome}/nix/.apps";
in in
lib.hm.dag.entryAfter [ "writeBoundary" ] '' lib.hm.dag.entryAfter [ "writeBoundary" ] /* bash */ ''
last_apps=$(cat "${lastAppsFile}" 2>/dev/null || echo "") last_apps=$(cat "${lastAppsFile}" 2>/dev/null || echo "")
next_apps=$(readlink -f ${apps}/Applications/* | sort) next_apps=$(readlink -f ${apps}/Applications/* | sort)

View file

@ -99,11 +99,11 @@ in
}; };
functions = { functions = {
base64decode = '' base64decode = /* fish */ ''
echo "$argv" | base64 --decode echo "$argv" | base64 --decode
''; '';
upn = '' upn = /* fish */ ''
set -f os (uname) set -f os (uname)
switch $os switch $os
@ -117,7 +117,7 @@ in
end end
''; '';
upp = '' upp = /* fish */ ''
if not test -f ./.envrc; or rg --quiet '^use flake$' ./.envrc if not test -f ./.envrc; or rg --quiet '^use flake$' ./.envrc
nix flake update ./ -v nix flake update ./ -v
else else
@ -125,17 +125,17 @@ in
end end
''; '';
wget-browser = '' wget-browser = /* fish */ ''
set user_agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15" set user_agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15"
${pkgs.wget}/bin/wget -U "$user_agent" $argv ${pkgs.wget}/bin/wget -U "$user_agent" $argv
''; '';
aria-browser = '' aria-browser = /* fish */ ''
set user_agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15" set user_agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15"
${pkgs.aria2}/bin/aria2c -U "$user_agent" --file-allocation none --async-dns=false -x 2 $argv ${pkgs.aria2}/bin/aria2c -U "$user_agent" --file-allocation none --async-dns=false -x 2 $argv
''; '';
mysqld-direnv-init = '' mysqld-direnv-init = /* fish */ ''
if type -q mysql_install_db if type -q mysql_install_db
mysql_install_db --user $USER --datadir=$PWD/.direnv/mysql/data --auth-root-authentication-method=normal mysql_install_db --user $USER --datadir=$PWD/.direnv/mysql/data --auth-root-authentication-method=normal
else else
@ -144,7 +144,7 @@ in
''; '';
}; };
shellInit = '' shellInit = /* fish */ ''
# Disable greeting # Disable greeting
set fish_greeting set fish_greeting

View file

@ -89,7 +89,7 @@ in
])).dependencies; ])).dependencies;
}; };
in in
'' /* lua */ ''
vim.loader.enable() vim.loader.enable()
vim.opt.runtimepath:prepend("${treesitter-parsers}") vim.opt.runtimepath:prepend("${treesitter-parsers}")
@ -140,7 +140,7 @@ in
{ {
plugin = leap-nvim; plugin = leap-nvim;
config = '' config = /* fennel */ ''
(let [leap (require :leap)] (let [leap (require :leap)]
(leap.set_default_keymaps)) (leap.set_default_keymaps))
''; '';
@ -273,7 +273,7 @@ in
{ {
plugin = nvim-ts-autotag; plugin = nvim-ts-autotag;
config = '' config = /* fennel */ ''
(let [ts-autotag (require :nvim-ts-autotag)] (let [ts-autotag (require :nvim-ts-autotag)]
(ts-autotag.setup)) (ts-autotag.setup))
''; '';
@ -310,7 +310,7 @@ in
{ {
plugin = virt-column-nvim; plugin = virt-column-nvim;
config = '' config = /* fennel */ ''
(let [virt-column (require :virt-column)] (let [virt-column (require :virt-column)]
(virt-column.setup)) (virt-column.setup))
''; '';

View file

@ -14,7 +14,7 @@
helper_binaries_dir = ["${config.home.profileDirectory}/bin"] helper_binaries_dir = ["${config.home.profileDirectory}/bin"]
''; '';
programs.fish.functions.podman = '' programs.fish.functions.podman = /* fish */ ''
fish -c "set -e SSH_AUTH_SOCK; ${config.home.profileDirectory}/bin/podman $argv" fish -c "set -e SSH_AUTH_SOCK; ${config.home.profileDirectory}/bin/podman $argv"
''; '';
} }

View file

@ -16,7 +16,7 @@ in
package = wezterm-pkg; package = wezterm-pkg;
extraConfig = '' extraConfig = /* lua */ ''
_G.shells = { _G.shells = {
bash = '${pkgs.bash.outPath}/bin/bash', bash = '${pkgs.bash.outPath}/bin/bash',
fish = '${pkgs.fish.outPath}/bin/fish', fish = '${pkgs.fish.outPath}/bin/fish',