diff --git a/README.md b/README.md new file mode 100644 index 0000000..793c407 --- /dev/null +++ b/README.md @@ -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 +``` \ No newline at end of file diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..afd0086 --- /dev/null +++ b/bootstrap.sh @@ -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 \ No newline at end of file diff --git a/home-manager/install.sh b/home-manager/install.sh deleted file mode 100644 index 2441b86..0000000 --- a/home-manager/install.sh +++ /dev/null @@ -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 '' -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 \ No newline at end of file diff --git a/link.sh b/nixos/link.sh similarity index 100% rename from link.sh rename to nixos/link.sh