From 455dae7a13008dab0ebb292ac74fb00db197974c Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Sun, 3 Mar 2024 19:31:13 -0600 Subject: Update git to deploy with working script --- posts/git-to-deploy.njk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/posts/git-to-deploy.njk b/posts/git-to-deploy.njk index 9676602..6ec1ec8 100644 --- a/posts/git-to-deploy.njk +++ b/posts/git-to-deploy.njk @@ -24,7 +24,7 @@ It makes use of git, so it allows me to make my changes using a git flow similar to Heroku. Here is what the installation script looks like:

# Start of by adding git to our configuration.nix, we will levarage this to
 # be able to easily make changes to our machine without SSH.
-sed -i 's/}/  programs.git.enable = true;\n}/g' /etc/nixos/configuration.nix
+sed -i 's/^{$/{\n  programs.git.enable = true;/' /etc/nixos/configuration.nix
 
 # Rebuild nix so we have git available
 nixos-rebuild switch
@@ -83,3 +83,4 @@ href="https://sourcehut.org/">Sourcehut, you can do so easily:

href="https://github.com/elitak/nixos-infect/tree/master">Nixos-infect to setup NixOS on a VPC that I rent on Hetzner Cloud.

Edit: Thanks to Valentin Gagarin for pointing out the distinction between Nix and NixOS. I have updated the article to correctly call it NixOS instead of Nix.

+

Edit2: Thanks to James T on NixOS Discourse for pointing out some errors in the script. I've updated them accordingly.

-- cgit v1.2.3