diff --git a/hosts/nas/nix-serve.nix b/hosts/nas/nix-serve.nix index ba74529..9210750 100755 --- a/hosts/nas/nix-serve.nix +++ b/hosts/nas/nix-serve.nix @@ -99,6 +99,22 @@ echo "pi5 failed to build at $(date)" git reset --hard fi + + echo "Starting build of jallen-nas at $(date)" + if nix flake update nas-nixpkgs nas-authentik-nix nas-cosmic nas-crowdsec nas-home-manager nas-impermanence nas-lanzaboote nas-nixos-hardware nas-sops-nix; then + echo "jallen-nas flake updated successfully at $(date)" + else + echo "jallen-nas flake failed to update at $(date)" + fi + export NIXPKGS_ALLOW_UNFREE=1 + if nix build .\#nixosConfigurations.jallen-nas.config.system.build.toplevel --no-link --impure; then + echo "jallen-nas built successfully at $(date)" + git add . + git commit -m "Jallen-NAS Updates $(date)" + else + echo "jallen-nas failed to build at $(date)" + git reset --hard + fi # git push ''; @@ -122,21 +138,4 @@ RandomizedDelaySec = "1h"; # Spread load }; }; -} - - # echo "Starting build of jallen-nas at $(date)" - # if nix flake update nas-nixpkgs nas-authentik-nix nas-cosmic nas-crowdsec nas-home-manager nas-impermanence nas-lanzaboote nas-nixos-hardware nas-sops-nix; then - # echo "jallen-nas flake updated successfully at $(date)" - # else - # echo "jallen-nas flake failed to update at $(date)" - # exit 1 - # fi - # if NIXPKGS_ALLOW_UNFREE=1 nix build .\#nixosConfigurations.jallen-nas.config.system.build.toplevel --no-link --impure; then - # echo "jallen-nas built successfully at $(date)" - # git add . - # git commit -m "Jallen-NAS Updates $(date)" - # else - # echo "jallen-nas failed to build at $(date)" - # git reset --hard - # exit 1 - # fi \ No newline at end of file +} \ No newline at end of file