My dotfiles
nix flake update
Updates dependencies pinned in flake.lock.
sudo nixos-rebuild switch --flake github:username/repository#configuration --impure
For some reason, the branch can be specified like this: username/repository/branch#configuration
sudo nixos-rebuild switch --flake .#configuration --impure
The
#configurationtells NixOS what configuration to build. They are defined undernixosConfigurationsor can be found in hosts. The default value is your system’s hostname and thus can often be omitted.
--impureis needed because the NixOS configurations reference system-specific files like/etc/nixos/hardware-configuration.nix, which I don’t want to be part of this flake repository.
home-manager switch --flake .#configuration