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; enable = true;
description = "Rebuild desktop NixOS configurations for cache"; description = "Rebuild NixOS configurations for cache";
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
User = "admin"; User = "admin";
@@ -78,28 +78,51 @@ in
if [ -d .git ]; then if [ -d .git ]; then
git pull || echo "Warning: Could not pull latest changes" git pull || echo "Warning: Could not pull latest changes"
fi fi
echo "Starting build of matt-nixos at $(date)" echo "Updating flake 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 if nix flake update; then
echo "matt-nixos flake updated successfully at $(date)" echo "flake updated successfully at $(date)"
else else
echo "matt-nixos failed to build at $(date)" echo "failed to update flake $(date)"
fi fi
if nix build .\#nixosConfigurations.matt-nixos.config.system.build.toplevel --no-link; then
echo "matt-nixos built successfully at $(date)" if NIXPKGS_ALLOW_UNFREE=1 nix flake check --impure; then
git add . echo "flake checked successfully at $(date)"
git commit -m "Desktop Updates $(date)"
else else
echo "matt-nixos failed to build at $(date)" echo "flake check failed at $(date)"
git reset --hard git reset --hard
fi 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 # Include timers for cache rebuilds
systemd.timers = { systemd.timers = {
nix-rebuild-cache-desktop = { nix-rebuild-cache = {
description = "Timer for rebuilding desktop NixOS configurations cache"; description = "Timer for rebuilding NixOS configurations cache";
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
timerConfig = { timerConfig = {
OnCalendar = "weekly"; OnCalendar = "weekly";