From 732720117d33258aa43ff85f8f55b4bcbfbe375d Mon Sep 17 00:00:00 2001 From: James Walker Date: Thu, 3 Oct 2024 21:46:45 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20don't=20always=20init=20chezmoi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.lock | 24 ++++++++++++------------ nix/users/walkah/home.nix | 4 +++- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index 1b4c0c0..e257863 100644 --- a/flake.lock +++ b/flake.lock @@ -137,11 +137,11 @@ ] }, "locked": { - "lastModified": 1727383923, - "narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=", + "lastModified": 1727817100, + "narHash": "sha256-dlyV9/eiWkm/Y/t2+k4CFZ29tBvCANmJogEYaHeAOTw=", "owner": "nix-community", "repo": "home-manager", - "rev": "ffe2d07e771580a005e675108212597e5b367d2d", + "rev": "437ec62009fa8ceb684eb447d455ffba25911cf9", "type": "github" }, "original": { @@ -207,11 +207,11 @@ ] }, "locked": { - "lastModified": 1727702862, - "narHash": "sha256-4ai7yRN8b2i43gNTAXfAuOw/uIzGqMLON1IXtIRrwOM=", + "lastModified": 1727917377, + "narHash": "sha256-eefXdEPUMuhiV6Vy3ASSyApCseE9OoKDgL/G6qenw/4=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "f7eb021d9dfd61f0e0075e483f3579c6f8453bb3", + "rev": "9ae128172f823956e54947fe471bc6dfa670ecb4", "type": "github" }, "original": { @@ -222,11 +222,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1727716680, - "narHash": "sha256-uMVkVHL4r3QmlZ1JM+UoJwxqa46cgHnIfqGzVlw5ca4=", + "lastModified": 1727937504, + "narHash": "sha256-LArYFBmjtUeoCyrVM5volpdqeRczRnYH20AZaeTMD+o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b5b22b42c0d10c7d2463e90a546c394711e3a724", + "rev": "2497fcbfa209055362f1029dcbd6bf9c928e937b", "type": "github" }, "original": { @@ -294,11 +294,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1727514110, - "narHash": "sha256-0YRcOxJG12VGDFH8iS8pJ0aYQQUAgo/r3ZAL+cSh9nk=", + "lastModified": 1727854478, + "narHash": "sha256-/odH2nUMAwkMgOS2nG2z0exLQNJS4S2LfMW0teqU7co=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "85f7a7177c678de68224af3402ab8ee1bcee25c8", + "rev": "5f58871c9657b5fc0a7f65670fe2ba99c26c1d79", "type": "github" }, "original": { diff --git a/nix/users/walkah/home.nix b/nix/users/walkah/home.nix index 035f29e..a063288 100644 --- a/nix/users/walkah/home.nix +++ b/nix/users/walkah/home.nix @@ -16,7 +16,9 @@ activation.chezmoi = lib.hm.dag.entryAfter [ "installPackages" ] '' export PATH="${pkgs.git}/bin:$PATH" - $DRY_RUN_CMD ${pkgs.chezmoi}/bin/chezmoi init --apply walkah/dotfiles + if [ ! -d $HOME/.local/share/chezmoi ]; then + $DRY_RUN_CMD ${pkgs.chezmoi}/bin/chezmoi init --apply walkah/dotfiles + fi ''; stateVersion = "24.05";