diff --git a/.config/linux/system/module/common/Dotfiles.nix b/.config/linux/system/module/common/Dotfiles.nix index 4632330..6179b4c 100644 --- a/.config/linux/system/module/common/Dotfiles.nix +++ b/.config/linux/system/module/common/Dotfiles.nix @@ -5,7 +5,17 @@ serviceConfig.Type = "oneshot"; script = '' cd ~ - test -d .git || cp -r ${inputs.dotfiles}/{*,.*} . + test -d .git || { + cp -r ${inputs.dotfiles}/{*,.*} . + ${pkgs.git}/bin/git init + ${pkgs.git}/bin/git remote add origin https://git.voronind.com/voronind/linux.git + ${pkgs.git}/bin/git fetch + ${pkgs.git}/bin/git reset origin/main + ${pkgs.git}/bin/git reset --hard HEAD + ${pkgs.git}/bin/git checkout main + ${pkgs.git}/bin/git branch --set-upstream-to=origin/main main + ${pkgs.git}/bin/git branch -D master + }; ${pkgs.git}/bin/git pull ''; };