Everything in this repo is fully declarative. You should be able to go from zero to OS in 15 minutes.
Home Manager is managed separately from NixOS, so NixOS machines should follow both the NixOS and Home Manager sections below.
- Clone this repo to
~/infra
First, install Nix.
Then, run Home Manager. On non-NixOS systems, you need to add experimental-features = nix-command flakes
to /etc/nix/nix.conf
first. This can be removed once --extra-experimental-features "nix-command flakes"
on the command below starts working again.
nix run home-manager/master -- switch --flake ~/infra#{mac,linux,nixos}
After this, you can use hmswitch
.
If you want to use a non-default user (mjmaurer
), you should add it to flake.nix
under homeConfigurations
.
There's probably not much use to this, because you'd still have to update based on the central flake.
nix run home-manager/master -- init
After, you would need to setup the central flake as an input to the standalone flake, and use the appropriate homeConfiguration derivation. Then run:
nix run home-manager/master -- init --switch
You'd need to run nix flake update
to update the standalone flake.
Go to this repo and run nix flake update
.
This will update the flake inputs (e.g. nixpkgs, home-manager, etc).