From bca570dd763b9147da7fa0d4ec2c436beba86564 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 21 Sep 2023 00:35:48 +0100 Subject: [PATCH] Revert "actions: add aarch64-linux remote builder" This reverts commit a17d59c9b1c6b6b5472e74006c323695e7e660f1. --- .github/workflows/build-and-cache.yml | 13 ------------- actions/build-and-cache.nix | 9 +-------- actions/constants.nix | 1 - actions/steps.nix | 16 ---------------- actions/update-flakes.nix | 4 ++++ 5 files changed, 5 insertions(+), 38 deletions(-) diff --git a/.github/workflows/build-and-cache.yml b/.github/workflows/build-and-cache.yml index b279710e..db96a514 100644 --- a/.github/workflows/build-and-cache.yml +++ b/.github/workflows/build-and-cache.yml @@ -13,21 +13,10 @@ jobs: root-reserve-mb: 512 swap-size-mb: 1024 - uses: actions/checkout@v4 - - name: Tailscale - uses: tailscale/github-action@v2 - with: - oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }} - oauth-secret: ${{ secrets.TS_OAUTH_SECRET }} - tags: tag:ci - - name: Setup SSH for Nix's remote builders - run: | - sudo mkdir -p /root/.ssh - printf 'Host *\n\tStrictHostKeyChecking accept-new' | sudo tee /root/.ssh/config - uses: cachix/install-nix-action@v22 with: extra_nix_config: | access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - builders = ssh://zatsune-nixos-uk aarch64-linux nix_path: nixpkgs=channel:nixos-unstable - uses: cachix/cachix-action@v12 with: @@ -46,8 +35,6 @@ jobs: nix build --print-build-logs '.#nixosConfigurations.miku-nixos.config.system.build.toplevel' nix build --print-build-logs '.#nixosConfigurations.mirai-vps.config.system.build.toplevel' nix build --print-build-logs '.#nixosConfigurations.sankyuu-nixos.config.system.build.toplevel' - - name: 'Build NixOS configs for: zatsune-nixos' - run: nix build --print-build-logs '.#nixosConfigurations.zatsune-nixos.config.system.build.toplevel' build-macos: runs-on: macos-13 steps: diff --git a/actions/build-and-cache.nix b/actions/build-and-cache.nix index 7eff4b79..2cd464ce 100644 --- a/actions/build-and-cache.nix +++ b/actions/build-and-cache.nix @@ -12,18 +12,11 @@ with constants; steps = with steps; [ maximimizeBuildSpaceStep checkoutStep - setupTailscale - setupSshForRemoteBuilder - (installNixActionStep { - extraNixConfig = '' - builders = ssh://zatsune-nixos-uk aarch64-linux - ''; - }) + (installNixActionStep { }) cachixActionStep setDefaultGitBranchStep (buildHomeManagerConfigurations { }) (buildNixOSConfigurations { }) - (buildNixOSConfigurations { hostnames = [ "zatsune-nixos" ]; }) ]; }; build-macos = { diff --git a/actions/constants.nix b/actions/constants.nix index fb4a4660..997f63fc 100644 --- a/actions/constants.nix +++ b/actions/constants.nix @@ -6,7 +6,6 @@ maximize-build-space = "easimon/maximize-build-space@v7"; create-pull-request = "peter-evans/create-pull-request@v5"; command-output = "mathiasvr/command-output@v2.0.0"; - tailscale = "tailscale/github-action@v2"; }; ubuntu.runs-on = "ubuntu-latest"; macos.runs-on = "macos-13"; diff --git a/actions/steps.nix b/actions/steps.nix index b79d6ef5..9dee89e9 100644 --- a/actions/steps.nix +++ b/actions/steps.nix @@ -115,20 +115,4 @@ with constants; sudo apt-get install -q -y qemu-system-aarch64 qemu-efi binfmt-support qemu-user-static ''; }; - setupSshForRemoteBuilder = { - name = "Setup SSH for Nix's remote builders"; - run = '' - sudo mkdir -p /root/.ssh - printf 'Host *\n\tStrictHostKeyChecking accept-new' | sudo tee /root/.ssh/config - ''; - }; - setupTailscale = { - name = "Tailscale"; - uses = actions.tailscale; - "with" = { - oauth-client-id = "\${{ secrets.TS_OAUTH_CLIENT_ID }}"; - oauth-secret = "\${{ secrets.TS_OAUTH_SECRET }}"; - tags = "tag:ci"; - }; - }; } diff --git a/actions/update-flakes.nix b/actions/update-flakes.nix index df191ae8..78b64308 100644 --- a/actions/update-flakes.nix +++ b/actions/update-flakes.nix @@ -1,6 +1,7 @@ let steps = import ./steps.nix; constants = import ./constants.nix; + first = list: builtins.elemAt list 0; in with constants; { @@ -18,9 +19,12 @@ with constants; (installNixActionStep { }) setDefaultGitBranchStep cachixActionStep + # (buildNixOSConfigurations { hostnames = [ (first nixos.hostnames) ]; extraNixFlags = [ "-o /tmp/nixos_old" ]; }) updateFlakeLockStep (buildHomeManagerConfigurations { }) (buildNixOSConfigurations { }) + # (buildNixOSConfigurations { hostnames = [ (first nixos.hostnames) ]; extraNixFlags = [ "-o /tmp/nixos_new" ]; }) + # (diffNixOutputs "NixOS" "/tmp/nixos_old" "/tmp/nixos_new") (createPullRequestStep [ ]) ]; };