Skip to content

Commit

Permalink
nix: update install for ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
ericdallo committed Mar 11, 2024
1 parent a20c588 commit 1a7b9f6
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .config/sxhkd/sxhkdrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ super + e
emacsclient -c

super + shift + e
emacs
doom run

super + ctrl + e
systemctl --user restart emacs.service && \
Expand Down
2 changes: 2 additions & 0 deletions .nubank_extra
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
export PATH="$NU_HOME/nucli.py/bin:$PATH"
export PATH="$NU_HOME/nucli.bb/bin:$PATH"

export PATH="$HOME/flutter/bin:$PATH"

export ANDROID_HOME="$HOME/Android/Sdk"
export CUSTOMER_TOKEN=$(cat $NU_HOME/.nu/tokens/br/prod/customer_access)
export FLUTTER_PLATFORM_CLIENT_ENV=staging
35 changes: 35 additions & 0 deletions scripts/install-nix-ubuntu.sh
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

0 comments on commit 1a7b9f6

Please sign in to comment.