Last active
January 8, 2024 21:12
-
-
Save frenata/17de45a9220b232dae0c1a88117e8424 to your computer and use it in GitHub Desktop.
OSX reset nix commands
This file contains hidden or 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
# ~/Desktop/Alacritty.command | |
~/reset-nix.sh | |
alacritty & | |
exit |
This file contains hidden or 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
# ~/.config/nixpkgs/config.nix | |
packageOverrides = pkgs: with pkgs; { | |
tools = pkgs.buildEnv { | |
name = "standard"; | |
paths = [ | |
httpie | |
tmux | |
alacritty | |
emacs | |
jq | |
zsh | |
docker | |
unixtools.watch | |
dpkg | |
ranger | |
tree | |
gnutar | |
graphviz | |
tldr | |
htop | |
inetutils | |
nmap | |
got | |
gimp | |
packer | |
]; | |
}; | |
dev = pkgs.buildEnv { | |
name = "dev"; | |
paths = [ | |
clojure | |
stack | |
go | |
ruff | |
]; | |
}; | |
}; | |
} |
This file contains hidden or 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
# ~/Desktop/Doom.command | |
~/reset-nix.sh | |
emacs & | |
exit |
This file contains hidden or 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
# ~/reset-nix.sh | |
#! /bin/sh | |
function reset () { | |
sudo rm /etc/zshrc.backup-before-nix | |
sudo rm /etc/bash.bashrc.backup-before-nix | |
sudo rm /etc/bashrc.backup-before-nix | |
curl -L https://nixos.org/nix/install -o nix.sh | |
sh nix.sh | |
rm nix.sh | |
} | |
function init() { | |
nix-env -iA nixpkgs.tools | |
nix-env -iA nixpkgs.dev | |
} | |
which alacritty | |
if [ $? -ne 0 ]; then | |
yes | reset | |
$(init) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment