dustinlyons / nixos-config

General purpose Nix configuration for macOS / NixOS with starter templates + step-by-step guides ✨
BSD 3-Clause "New" or "Revised" License
1.52k stars 95 forks source link

Can we document the correct way to update from your template? #82

Closed victorhooi closed 4 months ago

victorhooi commented 4 months ago

This might be due to the new-ness to all of this - but what is the proper way to update from your template, if we're partway through the install, or even after the install?

For example, there was a bug in the template that was fixed here.

However, I had already run this line previously (step 3 in the README):

mkdir -p nixos-config && cd nixos-config && nix flake --extra-experimental-features 'nix-command flakes' init -t github:dustinlyons/nixos-config#starter-with-secrets

When I checked ~/nixos-config, it wasn't a git directory - so I couldn't git pull (I assume this is by design?)

And running the last part of that command didn't work either, due to the existing files.

Is it possible to add a note to the README about the correct way to update from your template?

dustinlyons commented 4 months ago

If you're interested in bringing in upstream changes after creating your Nix configuration, you can fork the repo and pull in updates that way.

There is no direct way to "update" the template with Nix, nor does this configuration setup a Git repo for you (you'd have to do that yourself by typing git init inside the template dir).

victorhooi commented 4 months ago

Got it - I assume the recommendation is to always put your ~/nixos-config in some kind of version control (e.g. git), right?

As in, that's half the point of the whole declarative approach with Nix?

Do you think it would make sense to make this explicit in the README steps somewhere? (e.g. literally have git init be one of the steps).

For example, I've just run step 10, and now I've realised I should probably have run git init earlier, and set it all up, before I started hacking/kludging your configuration files...

Is there an optimal point it should be run, or is immediately after step 3. (3. Initialize a starter template) the best point?

dustinlyons commented 4 months ago

It's not really a requirement to add your configuration to git, so I'd rather not add it to instructions. Also some users may user different version control methods; this decision is independent of this project.