1
0
Fork 0

Compare commits

...

3 Commits

1 changed files with 9 additions and 11 deletions

View File

@ -161,24 +161,22 @@ function home_manager_setup() {
# otherwise you get a 'command not found' error like this # otherwise you get a 'command not found' error like this
# /nix/store/bpdrgm43y8mgjd5g6q13yfydj9057gly-home-manager/bin/home-manager: line 510: nix-build: command not found # /nix/store/bpdrgm43y8mgjd5g6q13yfydj9057gly-home-manager/bin/home-manager: line 510: nix-build: command not found
export PATH="${HOME}/.nix-profile/bin:/nix/var/nix/profiles/default/bin:$PATH" export PATH="${HOME}/.nix-profile/bin:/nix/var/nix/profiles/default/bin:$PATH"
HM_CONFIG_PATH="${HOME}/my-git-repos/$(whoami)/prathams-nixos"
nix_setup nix_setup
if ! command -v home-manager > /dev/null; then if ! command -v home-manager > /dev/null; then
# pushd-ing because otherwise the flake.nix points to mkdir -vp "${HM_CONFIG_PATH}"
# '/home/pratham/.config/home-manager/hm.flake.nix' but home-manager, git clone https://gitlab.com/thefossguy/prathams-nixos "${HM_CONFIG_PATH}"
# for some reason does not like it; probably because it assumes the nix run home-manager/master -- --print-build-logs init --switch --flake "${HM_CONFIG_PATH}"
# source to be **outside of $HOME**; so make it point to './<file>'
pushd "${HOME}/.config/home-manager"
[[ ! -f 'flake.nix' ]] && ln -s {hm.,}flake.nix
[[ ! -f 'home.nix' ]] && ln -s {common,home}.nix
popd
nix run home-manager/master -- init --switch
fi fi
} }
function run_rustup() { function run_rustup() {
"${HOME}"/.local/scripts/other-common-scripts/rust-manage.sh "${HOME}"/.nix-profile/bin/rustup RUSTUP_PATH="${HOME}"/.nix-profile/bin/rustup
if [[ -x "${RUSTUP_PATH}" && "${PERFORM_RUSTUP_SETUP:-0}" == 1 ]]; then
"${HOME}"/.local/scripts/other-common-scripts/rust-manage.sh "${HOME}"/.nix-profile/bin/rustup
fi
} }
function chsh_to_bash() { function chsh_to_bash() {
if [[ "$(uname -s)" == 'Darwin' ]]; then if [[ "$(uname -s)" == 'Darwin' ]]; then