Browse Source

update to nix 2

master
Yorick van Pelt 2 years ago
parent
commit
38875c2ad5
3 changed files with 21 additions and 2 deletions
  1. +18
    -1
      bash/.bashrc
  2. +2
    -0
      bin/update_userspace.sh
  3. +1
    -1
      install.sh

+ 18
- 1
bash/.bashrc View File

@@ -10,8 +10,25 @@ shopt -s histappend
HISTSIZE=100000
HISTFILESIZE=200000

alias nr="nix-repl '<nixpkgs>'"
alias nr="nix repl '<nixpkgs>'"
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;
}

+ 2
- 0
bin/update_userspace.sh View File

@@ -1,2 +1,4 @@
#!/usr/bin/env bash
set -e
nix build --no-link -f '<nixpkgs>' hosts.$(hostname -s)
nix-env -iA nixos.hosts.$(hostname -s)

+ 1
- 1
install.sh View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!nix-shell -i bash -p stow
$(nix-build '<nixpkgs>' -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)

Loading…
Cancel
Save