-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ve | ||
|
||
sudo apt update | ||
sudo apt install -y vim git curl build-essential dkms linux-headers-$(uname -r) bspwm libglfw3-dev libgles2-mesa-dev libgl1-mesa-dev xorg-dev | ||
#git clone https://github.com/ericdallo/dotfiles.git ~/.dotfiles | ||
|
||
sudo mkdir -p /nix | ||
sudo chown "$USERNAME" /nix | ||
sh <(curl -L https://nixos.org/nix/install) --no-daemon | ||
source "/home/$USERNAME/.nix-profile/etc/profile.d/nix.sh" | ||
|
||
echo "export NIX_PATH=$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels${NIX_PATH:+:$NIX_PATH}" >> ~/.bashrc | ||
echo "export NIXPKGS_ALLOW_UNFREE=1" >> ~/.bashrc | ||
|
||
nix-env -iA nixpkgs.home-manager | ||
|
||
mkdir -p ~/.config/nix | ||
echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf | ||
|
||
cd ~/.dotfiles/nix | ||
home-manager switch --flake . | ||
|
||
echo "export XDG_DATA_DIRS=$HOME/.nix-profile/share:$HOME/.share:\"${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}\"" >> ~/.profile | ||
echo "export XDG_DATA_DIRS=$HOME/.nix-profile/share:$HOME/.share:\"${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}\"" >> ~/.zprofile | ||
|
||
echo "if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then . $HOME/.nix-profile/etc/profile.d/nix.sh; fi" >> ~/.zprofile | ||
|
||
echo "/home/greg/.nix-profile/bin/zsh" | sudo tee -a /etc/shells > /dev/null | ||
sudo chsh -s /home/greg/.nix-profile/bin/zsh | ||
|
||
# Natural scrolling | ||
echo "xinput set-prop 13 324 1" >> ~/.profile | ||
echo "xinput set-prop 13 324 1" >> ~/.zprofile |