diff --git a/bash/.bashrc b/bash/.bashrc index d63c68d..d9754e3 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -10,8 +10,25 @@ shopt -s histappend HISTSIZE=100000 HISTFILESIZE=200000 -alias nr="nix-repl ''" +alias nr="nix repl ''" alias ns="nix-shell" alias nsp="nix-shell -p" alias niA="nix-env -iA nixos." alias subl="sublime3" + +# eval $(thefuck --alias) + + function fuck () { + TF_PYTHONIOENCODING=$PYTHONIOENCODING; + export TF_ALIAS=fuck; + export TF_SHELL_ALIASES=$(alias); + export TF_HISTORY=$(fc -ln -10); + export PYTHONIOENCODING=utf-8; + TF_CMD=$( + thefuck THEFUCK_ARGUMENT_PLACEHOLDER $@ + ) && eval $TF_CMD; + unset TF_HISTORY; + export PYTHONIOENCODING=$TF_PYTHONIOENCODING; + history -s $TF_CMD; + } + diff --git a/bin/update_userspace.sh b/bin/update_userspace.sh index 7141bdc..5603b68 100755 --- a/bin/update_userspace.sh +++ b/bin/update_userspace.sh @@ -1,2 +1,4 @@ #!/usr/bin/env bash +set -e +nix build --no-link -f '' hosts.$(hostname -s) nix-env -iA nixos.hosts.$(hostname -s) diff --git a/install.sh b/install.sh index 3285af3..152cd7f 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash #!nix-shell -i bash -p stow $(nix-build '' -A stow --no-out-link)/bin/stow -d `dirname $0` -t ~ nix git x pentadactyl gtk gpg mutt misc bash stow -nix-build -A $(hostname -s) +nix build -f. $(hostname -s)