Skip to content

joe-dipilato/ubuntu2024-home-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ubuntu2024-home-manager

Mount /nix from home dir

mkdir /home/ubuntu/nix
echo "/home/ubuntu/nix /nix auto defaults,nofail,nobootwait,bind 0 2" | sudo tee -a /etc/fstab
sudo systemctl daemon-reload
sudo systemctl restart local-fs.target

Install nix package manager

sh <(curl -L https://nixos.org/nix/install) --daemon --yes
# Start a new shell

Enable home-manager

nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager
nix-channel --update
nix-shell '<home-manager>' -A install

add to .bashrc / .zshrc

echo '. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"' >> ~/.bashrc
echo '. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"' >> ~/.zshrc

enable flakes

mkdir -p ~/.config/nix/
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
sudo systemctl restart nix-daemon.service

Install home manager

nix run home-manager/release-23.11 -- init --switch

This will generate a flake.nix and a home.nix file in ~/.config/home-manager

  • ~/.config/home-manager/home.nix
  • ~/.config/home-manager/flake.nix
home-manager switch --flake .

nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";

git config --global user.name "Joe DiPilato"
git config --global user.email "joe.dipilato@mongodb.com"

Update packages

nix-channel --update
nix flake update
home-manager switch --flake .
# nix-collect-garbage -d

About

ubuntu2024-home-manager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published