Migrate packages

This commit is contained in:
2025-04-22 21:14:51 +02:00
parent 642398da4b
commit d0942d018b
16 changed files with 127 additions and 253 deletions

View File

@ -0,0 +1,34 @@
{
writeShellApplication,
fd,
fzf,
}:
writeShellApplication {
name = "edit-config";
runtimeInputs = [
fd
fzf
];
text = ''
if [[ $# == 0 ]]; then
QUERY=""
else
QUERY="$1"
fi
FILE=$(fd -H -t f . ~/.dotfiles | fzf --query "$QUERY")
if [[ "$FILE" != "" ]]; then
$EDITOR "$FILE"
else
exit 1
fi
read -rp 'Run "home-manager switch"? [Yn]: ' yn
case $yn in
Y | y | Yes | yes | "" ) home-manager switch;;
* ) echo "Not switching home-manager configuration";;
esac
'';
}