Skip to content

Manual Updates

Justin Schaaf edited this page Jun 22, 2025 · 3 revisions

Sometimes, you may need to manually download a newer version of the config or simply want to test a config you already have on your system. This is how to do so.

Fetch from Git

Using nh

nh os boot github:justinhschaaf/nixos-config

Note

nh complains if you run it with sudo, it'll automatically ask you to elevate your credentials once it's done building the system and is ready to apply it.

Using nixos-rebuild

sudo nixos-rebuild boot --flake github:justinhschaaf/nixos-config

From another folder

Often times when I'm working on the system config, I'll need to copy the system's config directly from my development directory. This is the command I use to remove the existing config (located at /etc/nixos/) and copy it from my dev directory (~/the_shit/Programming/nixos-config/).

sudo rm -rf /etc/nixos/* && sudo cp -r ~/the_shit/Programming/nixos-config/* /etc/nixos/

Once this is done, rebuild the system.

Using nh

nh os boot "path:/etc/nixos"

Note

nh complains if you run it with sudo, it'll automatically ask you to elevate your credentials once it's done building the system and is ready to apply it.

Using nixos-rebuild

sudo nixos-rebuild boot --flake path:/etc/nixos
Clone this wiki locally