Add work config

This commit is contained in:
2024-12-04 09:27:39 -08:00
parent afcb55d5c4
commit 99d7f5df02
3 changed files with 41 additions and 25 deletions

View File

@@ -114,7 +114,10 @@
programs.zsh.enable = true;
# Home Manager
users.users.smparkin.home = "/Users/smparkin";
users.users = {
smparkin.home = "/Users/smparkin";
parkist.home = "/Users/parkist";
};
nix.configureBuildUsers = true;
nix.useDaemon = true;
};

33
nix/work.nix Normal file
View File

@@ -0,0 +1,33 @@
{ config, pkgs, ... }:
{
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "parkist";
home.homeDirectory = "/Users/parkist";
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "24.11";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# Home dir
home.file = {
".zshrc".source = ../zsh/zshrc;
".zsh.d/aliases".source = ../zsh/aliases;
".zsh.d/functions".source = ../zsh/functions;
".zsh.d/theme".source = ../zsh/theme;
".gitconfig".source = ../git/gitconfig;
".gitignore_global".source = ../git/gitignore_global;
".tmux.conf".source = ../tmux/tmux.conf;
".vimrc".source = ../vim/vimrc;
};
}

View File

@@ -14,37 +14,17 @@ if [ "$OSTYPE" = "Linux" ]; then
sudo pacman -Sy coreutils vim zsh jq python3
fi
elif [ "$OSTYPE" = "Darwin" ]; then
echo "Install Homebrew? [y/n]"
read homebrew
if [ "$homebrew" = "y" ]; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "Restore from Brewfile? [y/n]"
read bundle
if [ "$bundle" = "y" ]; then
brew bundle install --file=Brewfile
else
brew install coreutils neofetch vim zsh jq python3
fi
fi
echo "Install Nix? [y/n]"
read install_nix
if [ "$install_nix" = "y" ]; then
sh <(curl -L https://nixos.org/nix/install)
fi
# silence login message
touch ~/.hushlogin
# get ohmyzsh setup
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh/
# remove common files and symlink new files
rm ~/.zshrc ~/.vimrc ~/.tmux.conf
mkdir ~/.zsh.d
ln -s ~/dotfiles/aliases ~/.zsh.d/aliases
ln -s ~/dotfiles/functions ~/.zsh.d/functions
ln -s ~/dotfiles/zshrc ~/.zshrc
ln -s ~/dotfiles/gitconfig ~/.gitconfig
ln -s ~/dotfiles/gitignore_global ~/.gitignore_global
ln -s ~/dotfiles/newstephen.zsh-theme ~/.oh-my-zsh/custom/themes/newstephen.zsh-theme
ln -s ~/dotfiles/tmux.conf ~/.tmux.conf
ln -s ~/dotfiles/vimrc ~/.vimrc
mkdir ~/Developer