From b114a0182e8ce46ff39625c36a2f25d870d4ac31 Mon Sep 17 00:00:00 2001 From: cy Date: Sun, 19 Jan 2025 19:54:35 -0500 Subject: [PATCH] can we build machines --- .github/workflows/build-and-cache.yml | 35 ++++++++++++++++++++++++++- flake.lock | 18 +++++++------- 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-and-cache.yml b/.github/workflows/build-and-cache.yml index 4c22e7d..e4576d4 100644 --- a/.github/workflows/build-and-cache.yml +++ b/.github/workflows/build-and-cache.yml @@ -3,7 +3,7 @@ on: workflow_dispatch: push: jobs: - build: + build-packages: strategy: matrix: package: @@ -28,3 +28,36 @@ jobs: cache: ${{ vars.ATTIC_CACHE }} token: ${{ secrets.ATTIC_TOKEN }} - run: nix build -L '${{ matrix.package }}' + build-machines: + strategy: + matrix: + machine: + - chunk + - ytnix + - titan + home: + - yt@ytnix + - yt@chunk + + os: + - ubuntu-latest + # - macos-latest + runs-on: ${{ matrix.os }} + continue-on-error: true + steps: + - uses: DeterminateSystems/nix-installer-action@main + with: + logger: pretty + - uses: DeterminateSystems/magic-nix-cache-action@main + - name: Setup Attic cache + uses: ryanccn/attic-action@v0 + with: + endpoint: ${{ vars.ATTIC_ENDPOINT }} + cache: ${{ vars.ATTIC_CACHE }} + token: ${{ secrets.ATTIC_TOKEN }} + - name: Sync repository + uses: actions/checkout@v4 + with: + persist-credentials: false + - run: nix build -L .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel + # - run: nix build -L .#homeConfigurations."${{ matrix.home }}".activationPackage diff --git a/flake.lock b/flake.lock index db6dff3..25c44cd 100644 --- a/flake.lock +++ b/flake.lock @@ -266,11 +266,11 @@ ] }, "locked": { - "lastModified": 1737221749, - "narHash": "sha256-igllW0yG+UbetvhT11jnt9RppSHXYgMykYhZJeqfHs0=", + "lastModified": 1737299337, + "narHash": "sha256-0NBrY2A7buujKmeCbieopOMSbLxTu8TFcTLqAbTnQDw=", "owner": "nix-community", "repo": "home-manager", - "rev": "97d7946b5e107dd03cc82f21165251d4e0159655", + "rev": "f8ef4541bb8a54a8b52f19b52912119e689529b3", "type": "github" }, "original": { @@ -436,11 +436,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1737241062, - "narHash": "sha256-GM4ZnlsuJWjk+tbespU/DWQsZ2V0u0CS3Hqg0JGMt5M=", + "lastModified": 1737274611, + "narHash": "sha256-tmD7875tu1P0UvhI3Q/fXvIe8neJo7H9ZrPQ+QF7Q3E=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b681ff2c9c9163f24ca705d948bb0cee1b3e09f9", + "rev": "50165c4f7eb48ce82bd063e1fb8047a0f515f8ce", "type": "github" }, "original": { @@ -525,11 +525,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1737200978, - "narHash": "sha256-QTUx/F8HVjrRIHQxHKrr72aPMj+cDk18WTbvBCCBBdI=", + "lastModified": 1737308837, + "narHash": "sha256-Sro74XNFgGgIIW4uo/YSVGafZhKnZwPLJNBvMsgpl4k=", "owner": "nix-community", "repo": "nixvim", - "rev": "cbf960e5659054b2ccf27b67218782e69016bef5", + "rev": "8fb2fe22c237b25b8af346870e126fdaeaff688b", "type": "github" }, "original": {