dotfiles

My dotfiles


Useful Commands

Update Flakes

nix flake update

Updates dependencies pinned in flake.lock.

Rebuild and Switch with Flakes

Remote

sudo nixos-rebuild switch --flake github:username/repository#configuration --impure

For some reason, the branch can be specified like this: username/repository/branch#configuration

Local

sudo nixos-rebuild switch --flake .#configuration --impure

The #configuration tells NixOS what configuration to build. They are defined under nixosConfigurations or can be found in hosts. The default value is your system’s hostname and thus can often be omitted.

--impure is 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

home-manager switch --flake .#configuration