feat(terminal): Change default tmux to fish shell

This commit is contained in:
uttarayan21
2024-03-28 13:33:46 +05:30
parent 5b9d2e9ce5
commit 4790bb85ad
3 changed files with 31 additions and 4 deletions

View File

@@ -5,7 +5,33 @@
lib,
device,
...
}: {
}: let
hotedit = pkgs.writeShellApplication {
name = "hotedit";
# description = "Edit files from nix store by replacing them with a local copy";
text = ''
if [ "$#" -eq 0 ]; then
echo "No arguments provided."
exit 1
elif [ "$#" -gt 1 ]; then
echo "More than 1 argument provided."
exit 1
fi
if [ -L "$1" ]; then
echo "The file is a symbolic link."
mv "$1" "$1.bak"
cp "$1.bak" "$1"
chmod +rw "$1"
else
echo "The file is not a symbolic link."
exit 1
fi
exec $EDITOR "$1"
'';
};
in {
imports =
[
inputs.nix-index-database.hmModules.nix-index
@@ -65,6 +91,7 @@
fzf
(nerdfonts.override {fonts = ["Hasklig"];})
pfetch-rs
hotedit
]
++ lib.optionals device.isLinux [
(pkgs.wrapMpv