From 76134f45337c645ddb12a0002ef7a1b426471d5d Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Sat, 23 Aug 2025 20:14:41 -0500 Subject: [PATCH] upd build --- modules/nixos/attic/default.nix | 49 ++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/modules/nixos/attic/default.nix b/modules/nixos/attic/default.nix index eca8160..2f69fcf 100644 --- a/modules/nixos/attic/default.nix +++ b/modules/nixos/attic/default.nix @@ -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";