My Nix environment. Once you have Nix installed, the first step is to clone this repo:
nix-shell -p git gh --run "gh auth login && gh repo clone samestep/env ~/github/samestep/env"There are separate configurations for the three different machines I use.
This machine has an x86 CPU and an NVIDIA RTX 3070, and runs NixOS.
Run these commands to setup the NixOS configuration:
sudo ln -fs ~/github/samestep/env/nixos/nixos/configuration.nix /etc/nixos/configuration.nix
nixos-rebuild switch --use-remote-sudoThen run these commands to do a standalone installation of Home Manager and setup the Home Manager configuration:
ln -fsT ~/github/samestep/env ~/.config/home-manager
nix run ~/github/samestep/env#home-manager -- init --switchYou may need to log out and back in to see everything installed in the GNOME applications launcher.
This machine has an Apple M1 chip and runs macOS.
Enable flakes by making sure this line is present in /etc/nix/nix.conf:
experimental-features = nix-command flakes
Then run these commands to do a standalone installation of Home Manager and setup the Home Manager configuration:
nix run ~/github/samestep/env#home-manager -- init --switch
rm -r ~/.config/home-manager
ln -s ~/github/samestep/env ~/.config/home-manager
nix run ~/github/samestep/env#home-manager switchThis machine has an x86 CPU and an NVIDIA GPU, and runs Ubuntu.
Enable flakes by making sure this line is present in /etc/nix/nix.conf:
experimental-features = nix-command flakes
Next enable user namespace creation by making sure the line kernel.apparmor_restrict_unprivileged_userns = 0 is present in some file under /etc/sysctl.d/, e.g. by running this command:
echo 'kernel.apparmor_restrict_unprivileged_userns = 0' | sudo tee /etc/sysctl.d/20-apparmor-donotrestrict.conf
Then run these commands to do a standalone installation of Home Manager and setup the Home Manager configuration:
ln -fsT ~/github/samestep/env ~/.config/home-manager
nix run ~/github/samestep/env#home-manager -- init --switch --impure