Programs, services, dotfiles, and configs backed up and managed with home-manager
Manual Install
Automated Install
This build would not be possible without Nix.
If using an operating system other than NixOS, install Nix.
curl -L https://nixos.org/nix/install | sh -s -- --daemon
curl -L https://nixos.org/nix/install | sh -s -- --no-daemon
Visit the community docs for more info.
Nix channels are what provide package stability. The master channel is the current stable branch.
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update
nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager
nix-channel --update
Change the release version to match your release
Now that your channel is added, install Home Manager via Nix.
nix-shell '<home-manager>' -A install
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
You can also add id to your .profile to source the script each time the terminal loads:
echo ". \"$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh\"" >> $HOME/.profile
Clone the repository (and all submodules) to the home-manager directory:
mkdir -p $HOME/.config/home-manager/
git clone --recurse-submodules https://github.com/theLockesmith/home-manager.git $HOME/.config/home-manager
If everything goes as planned, you can deploy your home environment by running:
home-manager switch
This install script will automate the entire process. It uses default locations and backs up your current .bashrc and .profile.
-d, --desktop Run the installer for a desktop environment (default)
-s, --server Run the installer for a server environment
--daemon Passes --daemon to NixOS installer (default)
--no-daemon Passes --no-daemon to NixOS installer
--no-backup Installer backs up dotfiles in your home directory by default. Use this flag to disable backups of dotfiles. *It is not advised to use this flag the first time you run this.
. <(curl -L https://raw.githubusercontent.com/theLockesmith/home-manager/main/.scripts/home-manager-switch) --desktop
. <(curl -L https://raw.githubusercontent.com/theLockesmith/home-manager/main/.scripts/home-manager-switch) --server
If you get an error that looks like error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted
or something similar, this is a known Nix issue. The only resolution I've found is to reboot.