mirror of
https://github.com/thilobillerbeck/dotfiles.git
synced 2024-11-14 21:08:49 +01:00
Merge branch 'main' of https://github.com/thilobillerbeck/dotfiles
This commit is contained in:
commit
bd88825542
4 changed files with 30 additions and 22 deletions
6
README.md
Normal file
6
README.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
# My Dotfiles
|
||||
And some desktop configs for NixOS which I currently not use
|
||||
|
||||
```
|
||||
curl -sSf -L https://raw.githubusercontent.com/thilobillerbeck/dotfiles/refs/heads/main/bootstrap.sh | sh
|
||||
```
|
24
bootstrap.sh
Executable file
24
bootstrap.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/env bash
|
||||
|
||||
# Install nix if not already installed
|
||||
if ! command -v nix &> /dev/null
|
||||
then
|
||||
echo "Nix is not installed. Installing..."
|
||||
curl -sSf -L https://install.lix.systems/lix | sh -s -- install
|
||||
echo "Nix installed. Please restart your shell."
|
||||
exit 0
|
||||
else
|
||||
echo "Nix is already installed."
|
||||
fi
|
||||
|
||||
# Clone the dotfiles repo into the proper directory
|
||||
if [ ! -d "$HOME/.config/home-manager" ]; then
|
||||
echo "Cloning dotfiles repo..."
|
||||
git clone https://github.com/thilobillerbeck/dotfiles.git $HOME/.config/home-manager
|
||||
else
|
||||
echo "Dotfiles repo already cloned."
|
||||
fi
|
||||
|
||||
# Install home-manager
|
||||
cd $HOME/.config/home-manager
|
||||
nix run .#homeConfigurations.$USER@$(hostname).activationPackage
|
|
@ -1,22 +0,0 @@
|
|||
#/bin/bash -e
|
||||
|
||||
# Install nix
|
||||
sh <(curl -L https://nixos.org/nix/install) --no-daemon
|
||||
source $HOME/.nix-profile/etc/profile.d/nix.sh
|
||||
|
||||
# Install home-manager
|
||||
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
|
||||
|
||||
# Install nixgl
|
||||
nix-channel --add https://github.com/guibou/nixGL/archive/main.tar.gz nixgl
|
||||
|
||||
nix-channel --update
|
||||
|
||||
nix-shell '<home-manager>' -A install
|
||||
|
||||
# use my home-manager config
|
||||
rm -rf ~/.config/home-manager
|
||||
git clone https://git.thilo-billerbeck.com/thilobillerbeck/home-manager.git ~/.config/home-manager
|
||||
|
||||
# switch configs
|
||||
home-manager switch
|
Loading…
Reference in a new issue