update script reboot fix

This commit is contained in:
2025-12-18 07:07:51 +01:00
parent 8960f59f0d
commit db5cd7a996
2 changed files with 4 additions and 4 deletions

View File

@@ -323,6 +323,7 @@
Unit = { Unit = {
Description = "Update home-manager configuration for ${hostname}"; Description = "Update home-manager configuration for ${hostname}";
After = "network-online.target"; After = "network-online.target";
X-RestartIfChanged = false;
}; };
Service = { Service = {
Type = "oneshot"; Type = "oneshot";
@@ -331,7 +332,6 @@
echo "[$(${pkgs.coreutils}/bin/date)] Starting home-manager update for ${flakeConfig}..." echo "[$(${pkgs.coreutils}/bin/date)] Starting home-manager update for ${flakeConfig}..."
# Prüfe ob lokales Repo existiert
if [ -d "/home/${config.home.username}/AZ-NIX" ]; then if [ -d "/home/${config.home.username}/AZ-NIX" ]; then
echo "Using local repository..." echo "Using local repository..."
cd /home/${config.home.username}/AZ-NIX cd /home/${config.home.username}/AZ-NIX
@@ -344,10 +344,10 @@
fi fi
echo "[$(${pkgs.coreutils}/bin/date)] Update completed successfully" echo "[$(${pkgs.coreutils}/bin/date)] Update completed successfully"
pkill -15 chromium ${pkgs.procps}/bin/pkill -15 chromium || true
sleep 5 sleep 5
echo "Rebooting system..." echo "Rebooting system..."
${pkgs.systemd}/bin/systemctl reboot ${pkgs.sudo}/bin/sudo ${pkgs.systemd}/bin/systemctl reboot
''}"; ''}";
}; };
}; };

View File

@@ -98,7 +98,7 @@
services.fstrim.enable = true; services.fstrim.enable = true;
# Open ports in the firewall. # Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ]; networking.firewall.allowedTCPPorts = [8080];
# networking.firewall.allowedUDPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether. # Or disable the firewall altogether.
# networking.firewall.enable = false; # networking.firewall.enable = false;