wip
This commit is contained in:
parent
a4aba8311e
commit
3d668a0ffe
11
README.md
11
README.md
@ -1,4 +1,13 @@
|
|||||||
# Run the following command to begin
|
# Menno's dotfiles
|
||||||
|
Welcome to my dotfiles repository. This repository contains my dotfiles and a setup script to install them on a new system.
|
||||||
|
It should work on any system that supports nix and home-manager.
|
||||||
|
|
||||||
|
## Install nix, home-manager and dotfiles on a new system
|
||||||
|
This script will install nix, home-manager and my dotfiles on a new system.
|
||||||
|
|
||||||
|
Tested on:
|
||||||
|
- Ubuntu 22.04
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -sSL https://raw.githubusercontent.com/vleeuwenmenno/dotfiles/master/setup.sh | bash -s -- "--install"
|
curl -sSL https://raw.githubusercontent.com/vleeuwenmenno/dotfiles/master/setup.sh | bash -s -- "--install"
|
||||||
```
|
```
|
16
setup.sh
16
setup.sh
@ -85,6 +85,11 @@ home_manager_setup() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch_to_home_manager() {
|
||||||
|
echo 'Running home-manager switch...'
|
||||||
|
home-manager switch --flake ~/.dotfiles
|
||||||
|
}
|
||||||
|
|
||||||
# Check if parameter is help, continue or initial
|
# Check if parameter is help, continue or initial
|
||||||
if [ "$1" == "-i" ] || [ "$1" == "--install" ]; then
|
if [ "$1" == "-i" ] || [ "$1" == "--install" ]; then
|
||||||
# Check if .dotfiles exists, if so stop
|
# Check if .dotfiles exists, if so stop
|
||||||
@ -105,15 +110,20 @@ if [ "$1" == "-i" ] || [ "$1" == "--install" ]; then
|
|||||||
# Clone dotfiles
|
# Clone dotfiles
|
||||||
clone_dotfiles
|
clone_dotfiles
|
||||||
|
|
||||||
echo 'Nix and dotfiles are installed, running initial home-manager setup...'
|
echo 'Nix and dotfiles are installed'
|
||||||
|
chmod +x ~/.dotfiles/setup.sh
|
||||||
bash -c "~/.dotfiles/setup.sh -c"
|
bash -c "~/.dotfiles/setup.sh -c"
|
||||||
elif [ "$1" == "-c" ] || [ "$1" == "--continue" ]; then
|
elif [ "$1" == "-c" ] || [ "$1" == "--continue" ]; then
|
||||||
|
echo 'Installing home-manager ...'
|
||||||
|
|
||||||
# Run initial home-manager setup
|
# Run initial home-manager setup
|
||||||
home_manager_setup
|
home_manager_setup
|
||||||
|
|
||||||
# Run initial home-manager switch
|
# Run initial home-manager switch
|
||||||
home-manager switch --flake ~/.dotfiles
|
switch_to_home_manager
|
||||||
echo 'Please restart your shell and enjoy your new environment!'
|
|
||||||
|
# We're done here!
|
||||||
|
echo 'Installation complete! Please restart your shell and enjoy!'
|
||||||
else
|
else
|
||||||
help
|
help
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user