mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-23 16:29:42 -04:00
nvm stupid idea
This commit is contained in:
parent
fb675823f3
commit
80fb4be023
5 changed files with 4 additions and 66 deletions
|
|
@ -19,12 +19,6 @@
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
configs = builtins.fetchTarball {
|
|
||||||
url = "https://github.com/itme-brain/nixos/raw/yolo-allin/terminal/configs.tar.gz";
|
|
||||||
sha256 = "1q6qcwp06hgia0wiz11jynxjh8l527ckfjpgz1cylczdfbv60vk1";
|
|
||||||
};
|
|
||||||
|
|
||||||
myTerminal = pkgs.callPackage ./terminal/shell.nix { inherit configs; };
|
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -40,7 +34,5 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultPackage.x86_64-linux = myTerminal;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,4 +20,4 @@ let
|
||||||
];
|
];
|
||||||
|
|
||||||
in
|
in
|
||||||
lsp ++ lsp' ++ pkgs.lazygit
|
lsp ++ lsp'
|
||||||
|
|
|
||||||
|
|
@ -25,5 +25,8 @@ in
|
||||||
source = ./config/lazyvim;
|
source = ./config/lazyvim;
|
||||||
recursive = true;
|
recursive = true;
|
||||||
};
|
};
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
lazygit
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,57 +0,0 @@
|
||||||
{ pkgs, configs, ... }:
|
|
||||||
|
|
||||||
|
|
||||||
with pkgs;
|
|
||||||
mkShell {
|
|
||||||
buildInputs = [
|
|
||||||
bash neovim alacritty
|
|
||||||
terminus-nerdfont noto-fonts-emoji
|
|
||||||
direnv nix-direnv
|
|
||||||
lsd git gnupg lazygit
|
|
||||||
];
|
|
||||||
|
|
||||||
shellHook = ''
|
|
||||||
echo "Preparing your environment, Bryan..."
|
|
||||||
|
|
||||||
tar -xzvf ${configs} -C .
|
|
||||||
|
|
||||||
if [ -f ~/.bashrc ] || [ -f ~/.config/alacritty/alacritty.yml ] || [ -d ~/.config/nvim ] || [ -f ~/.gitconfig ]; then
|
|
||||||
echo "Backing up existing config files..."
|
|
||||||
echo "You can find them at ~/your_configs.bak"
|
|
||||||
mkdir -p ~/your_configs.bak
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -f ~/.bashrc ] && mv ~/.bashrc ~/your_configs.bak/bashrc.bak
|
|
||||||
mv configs/bashrc ~/.bashrc
|
|
||||||
|
|
||||||
[ -f ~/.config/alacritty/alacritty.yml ] && mv ~/.config/alacritty ~/your_configs.bak/alacritty.bak
|
|
||||||
mv configs/alacritty ~/.config/alacritty
|
|
||||||
|
|
||||||
[ -d ~/.config/nvim ] && mv ~/.config/nvim ~/your_configs.bak/nvim.bak
|
|
||||||
mv configs/nvim ~/.config/nvim
|
|
||||||
|
|
||||||
[ -f ~/.gitconfig ] && mv ~/.gitconfig ~/your_configs.bak/gitconfig.bak
|
|
||||||
mv configs/gitconfig ~/.gitconfig
|
|
||||||
|
|
||||||
gpg --import configs/pub.key
|
|
||||||
|
|
||||||
rm configs
|
|
||||||
find . -type d -empty -delete
|
|
||||||
|
|
||||||
if [ -d ~/your_configs.bak ]; then
|
|
||||||
echo "Restore script has been created..."
|
|
||||||
cat > ~/your_configs.bak/restore.sh << EOF
|
|
||||||
#!/bin/sh
|
|
||||||
# To restore the original config, run the script using './restore.sh'
|
|
||||||
[ -f bashrc.bak ] && mv bashrc.bak ~/.bashrc
|
|
||||||
[ -d alacritty.bak ] && mv alacritty.bak ~/.config/alacritty
|
|
||||||
[ -d nvim.bak ] && mv nvim.bak ~/.config/nvim
|
|
||||||
[ -f gitconfig.bak ] && mv gitconfig.bak ~/.gitconfig
|
|
||||||
EOF
|
|
||||||
chmod +x ~/your_configs.bak/restore.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Terminal ready."
|
|
||||||
echo "Run `ldv` to get some existing environments."
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue