added new systemd update unit

This commit is contained in:
2026-04-02 12:54:32 -05:00
parent ad688a1d29
commit 08492cef94
3 changed files with 155 additions and 82 deletions

View File

@@ -129,7 +129,19 @@ in
};
};
# ── System update as a detached oneshot ─────────────────────
systemd.services.sovran-hub-update = {
description = "Sovran_SystemsOS System Update";
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.bash}/bin/bash -c 'cd /etc/nixos && nix flake update && nixos-rebuild switch && flatpak update -y'";
StandardOutput = "file:/var/log/sovran-hub-update.log";
StandardError = "file:/var/log/sovran-hub-update.log";
};
path = [ pkgs.nix pkgs.nixos-rebuild pkgs.git pkgs.flatpak ];
};
# ── Open firewall port ─────────────────────────────────────
networking.firewall.allowedTCPPorts = [ 8937 ];
};
}
}