Dotfiles : Prevent deadlock on install.

This commit is contained in:
Dmitry Voronin 2024-02-21 04:43:35 +03:00
parent b6d5fd5101
commit 6bc00fe38d
2 changed files with 5 additions and 2 deletions

View file

@ -7,7 +7,7 @@ in {
# Bootstrap apps on boot. # Bootstrap apps on boot.
systemd.services.flatpakinstall = { systemd.services.flatpakinstall = {
description = "Install Flatpak apps."; description = "Install Flatpak apps.";
wantedBy = [ "graphical-session-pre.target" ]; wantedBy = [ "multi-user.target" ];
wants = [ "dotfiles.service" ]; wants = [ "dotfiles.service" ];
after = [ "dotfiles.service" ]; after = [ "dotfiles.service" ];
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";

View file

@ -13,7 +13,10 @@
chmod -77 -R . chmod -77 -R .
${pkgs.git}/bin/git init ${pkgs.git}/bin/git init
${pkgs.git}/bin/git remote add origin https://git.voronind.com/voronind/linux.git ${pkgs.git}/bin/git remote add origin https://git.voronind.com/voronind/linux.git
${pkgs.git}/bin/git fetch ${pkgs.git}/bin/git fetch || {
rm -rf .git
exit 1
};
${pkgs.git}/bin/git reset origin/main ${pkgs.git}/bin/git reset origin/main
${pkgs.git}/bin/git reset --hard HEAD ${pkgs.git}/bin/git reset --hard HEAD
${pkgs.git}/bin/git checkout main ${pkgs.git}/bin/git checkout main