ci: drop darwin shims, rebuild locally on netty runner
Some checks failed
quality / changes (push) Successful in 2s
quality / Flake Check (push) Failing after 1s
quality / Nix Format Check (push) Failing after 1s
quality / Deploy netty (push) Has been skipped

- remove macOS-era `sudo mkdir /Users/rathi/...` shim steps from flake-check
  and nix-format (Linux runner, paths don't exist, gitea-runner has no sudo)
- deploy-netty now runs `sudo nixos-rebuild switch --flake .#netty` directly
  on the runner (it *is* netty), no SSH, no `just switch-netty`
- grant gitea-runner NOPASSWD sudo for nixos-rebuild only
- apply current nixfmt to home/scripts.nix, hermes-gateway.nix, devshells.nix

Made-with: Cursor
This commit is contained in:
Harivansh Rathi 2026-04-18 22:33:25 -04:00
parent ec2f23757b
commit 0aab0a4d61
5 changed files with 27 additions and 23 deletions

View file

@ -37,11 +37,6 @@ jobs:
if: ${{ needs.changes.outputs.quality == 'true' }} if: ${{ needs.changes.outputs.quality == 'true' }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Prepare local flake input shims
run: |
set -euo pipefail
sudo mkdir -p /Users/rathi/Documents/GitHub/companion/agentcomputer/apps
sudo ln -sfn "$GITHUB_WORKSPACE/ci/agentcomputer-cli-stub" /Users/rathi/Documents/GitHub/companion/agentcomputer/apps/cli
- run: nix flake check - run: nix flake check
nix-format: nix-format:
@ -51,11 +46,6 @@ jobs:
if: ${{ needs.changes.outputs.quality == 'true' }} if: ${{ needs.changes.outputs.quality == 'true' }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Prepare local flake input shims
run: |
set -euo pipefail
sudo mkdir -p /Users/rathi/Documents/GitHub/companion/agentcomputer/apps
sudo ln -sfn "$GITHUB_WORKSPACE/ci/agentcomputer-cli-stub" /Users/rathi/Documents/GitHub/companion/agentcomputer/apps/cli
- run: nix fmt -- --ci - run: nix fmt -- --ci
deploy-netty: deploy-netty:
@ -67,8 +57,8 @@ jobs:
group: deploy-netty group: deploy-netty
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Deploy netty - name: Rebuild netty
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
just switch-netty sudo nixos-rebuild switch --flake ".#netty"

View file

@ -8,6 +8,21 @@ let
cacheRoot = "/var/cache/forgejo-runner"; cacheRoot = "/var/cache/forgejo-runner";
in in
{ {
security.sudo.extraRules = [
{
users = [ "gitea-runner" ];
commands = [
{
command = "/run/current-system/sw/bin/nixos-rebuild";
options = [
"NOPASSWD"
"SETENV"
];
}
];
}
];
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d ${cacheRoot} 0750 gitea-runner gitea-runner -" "d ${cacheRoot} 0750 gitea-runner gitea-runner -"
"d ${cacheRoot}/cargo 0750 gitea-runner gitea-runner -" "d ${cacheRoot}/cargo 0750 gitea-runner gitea-runner -"

View file

@ -63,7 +63,7 @@ in
}; };
}; };
mcpServers = {}; mcpServers = { };
extraPackages = with pkgs; [ extraPackages = with pkgs; [
nodejs_22 nodejs_22

View file

@ -9,8 +9,7 @@
{ {
formatter = pkgs.nixfmt-tree; formatter = pkgs.nixfmt-tree;
packages = packages = {
{
home-manager = inputs.home-manager.packages.${system}.home-manager; home-manager = inputs.home-manager.packages.${system}.home-manager;
} }
// lib.optionalAttrs (lib.hasSuffix "darwin" system) { // lib.optionalAttrs (lib.hasSuffix "darwin" system) {