Add home-setup.sh

This commit is contained in:
David Morgan 2022-11-09 16:39:36 +00:00
parent f7821dec97
commit f208e67d99
Signed by: djm
GPG Key ID: C171251002C200F2
1 changed files with 16 additions and 0 deletions

16
setup-home.sh Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
git clone git@codeberg.org:djm/dotfiles.git
nix-channel --add https://github.com/nix-community/home-manager/archive/release-$(nixos-version | cut -d. -f1-2).tar.gz home-manager
nix-channel --update
export NIX_PATH=$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels${NIX_PATH:+:$NIX_PATH}
nix-shell '<home-manager>' -A install
[ -f ~/dotfiles/nix-conf/home/$HOST.nix ] && ln -sf ~/dotfiles/nix-conf/home/$HOST.nix ~/.config/nixpkgs/home.nix
ln -sf ~/dotfiles/.p10k.zsh ~/
ln -sf ~/dotfiles/.emacs.d ~/
home-manager switch