upd build

This commit is contained in:
mjallen18
2025-08-23 20:14:41 -05:00
parent 36010a4230
commit 76134f4533

View File

@@ -52,9 +52,9 @@ in
'';
};
nix-rebuild-cache-desktop = {
nix-rebuild-cache = {
enable = true;
description = "Rebuild desktop NixOS configurations for cache";
description = "Rebuild NixOS configurations for cache";
serviceConfig = {
Type = "oneshot";
User = "admin";
@@ -78,28 +78,51 @@ in
if [ -d .git ]; then
git pull || echo "Warning: Could not pull latest changes"
fi
echo "Starting build of matt-nixos at $(date)"
if nix flake update desktop-nixpkgs desktop-chaotic desktop-home-manager desktop-impermanence desktop-lanzaboote desktop-nixos-hardware desktop-sops-nix desktop-steam-rom-manager nixpkgs-unstable nixpkgs-stable nix-darwin; then
echo "matt-nixos flake updated successfully at $(date)"
echo "Updating flake at $(date)"
if nix flake update; then
echo "flake updated successfully at $(date)"
else
echo "matt-nixos failed to build at $(date)"
echo "failed to update flake $(date)"
fi
if nix build .\#nixosConfigurations.matt-nixos.config.system.build.toplevel --no-link; then
echo "matt-nixos built successfully at $(date)"
git add .
git commit -m "Desktop Updates $(date)"
if NIXPKGS_ALLOW_UNFREE=1 nix flake check --impure; then
echo "flake checked successfully at $(date)"
else
echo "matt-nixos failed to build at $(date)"
echo "flake check failed at $(date)"
git reset --hard
fi
if nh os build --hostname=nas; then
echo "nas built successfully at $(date)"
fi;
if nh os build --hostname=nuc; then
echo "nuc built successfully at $(date)"
fi;
if nh os build --hostname=desktop; then
echo "desktop built successfully at $(date)"
fi;
if nh os build --hostname=steamdeck; then
echo "steamdeck built successfully at $(date)"
fi;
if nh os build --hostname=pi4; then
echo "pi4 built successfully at $(date)"
fi;
if nh os build --hostname=pi5; then
echo "pi5 built successfully at $(date)"
fi;
'';
};
};
# Include timers for cache rebuilds
systemd.timers = {
nix-rebuild-cache-desktop = {
description = "Timer for rebuilding desktop NixOS configurations cache";
nix-rebuild-cache = {
description = "Timer for rebuilding NixOS configurations cache";
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "weekly";