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 GTX 970, 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-sudo
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 -- init --switch
You may need to log out and back in to see everything installed in the GNOME applications launcher, and to let Dropbox start for the first time.
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 -- init --switch
rm -r ~/.config/home-manager
ln -s ~/github/samestep/env ~/.config/home-manager
home-manager switch
This 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 -- init --switch --impure