Compare commits

...

50 Commits

Author SHA1 Message Date
4f6e2c3369 use s0
All checks were successful
Check Flake / check-flake (push) Successful in 2m49s
2023-04-29 18:18:52 -06:00
f9ba8473d2 Try host again
All checks were successful
Check Flake / check-flake (push) Successful in 1h22m28s
2023-04-29 15:30:28 -06:00
20b7117560 Try host again
All checks were successful
Check Flake / check-flake (push) Successful in 15s
2023-04-29 15:29:46 -06:00
aa7121fe93 Try host again
Some checks failed
Check Flake / check-flake (push) Failing after 2s
2023-04-29 15:27:50 -06:00
6929594da9 Try host again
Some checks failed
Check Flake / check-flake (push) Failing after 1s
2023-04-29 15:25:40 -06:00
8f76ad3037 Try host again
Some checks failed
Check Flake / check-flake (push) Failing after 1s
2023-04-29 15:24:48 -06:00
5a2f7eee0d Try host again
Some checks failed
Check Flake / check-flake (push) Failing after 2s
2023-04-29 15:20:23 -06:00
3c5f72aed0 Try host again
Some checks failed
Check Flake / check-flake (push) Failing after 2s
2023-04-29 15:17:40 -06:00
ae3dc094f9 Try host again
Some checks failed
Check Flake / check-flake (push) Failing after 3s
2023-04-29 15:01:03 -06:00
7160858f57 Try host again
Some checks failed
Check Flake / check-flake (push) Failing after 3s
2023-04-29 14:58:35 -06:00
883a9fb28f Try to allow cross build
Some checks failed
Check Flake / check-flake (push) Failing after 2m6s
2023-04-29 14:37:01 -06:00
4c4ee017e0 Try to allow cross build
Some checks failed
Check Flake / check-flake (push) Failing after 2m5s
2023-04-29 14:36:27 -06:00
feb006a99d Try to allow cross build
Some checks failed
Check Flake / check-flake (push) Failing after 2m15s
2023-04-29 14:21:44 -06:00
6575977ce1 Try to allow cross build
Some checks failed
Check Flake / check-flake (push) Failing after 2m14s
2023-04-29 14:17:37 -06:00
80774e8778 Try to allow cross build
Some checks failed
Check Flake / check-flake (push) Failing after 1m10s
2023-04-29 13:52:35 -06:00
9af90be28b Try to allow cross build
Some checks failed
Check Flake / check-flake (push) Failing after 7s
2023-04-29 11:08:21 -06:00
fba5ac6c2b Try to allow cross build
Some checks failed
Check Flake / check-flake (push) Failing after 1m3s
2023-04-29 11:01:13 -06:00
307dee979a Try to allow cross build
Some checks failed
Check Flake / check-flake (push) Failing after 1m3s
2023-04-29 10:48:12 -06:00
df9a227358 add secret
Some checks failed
Check Flake / check-flake (push) Failing after 1m2s
2023-04-29 10:15:44 -06:00
f332e415cf add secret
Some checks failed
Check Flake / check-flake (push) Failing after 19s
2023-04-29 10:10:38 -06:00
1040a10e16 try to unset vars
Some checks failed
Check Flake / check-flake (push) Failing after 25s
2023-04-29 10:07:24 -06:00
ad198eb473 try to unset vars
Some checks reported warnings
Check Flake / check-flake (push) Has been cancelled
2023-04-29 10:05:44 -06:00
b3b9e58ea3 try host
Some checks failed
Check Flake / check-flake (push) Failing after 1s
2023-04-23 20:35:28 -06:00
c44ab55aa0 try host
Some checks failed
Check Flake / check-flake (push) Failing after 1s
2023-04-23 20:33:19 -06:00
71ba560b37 try host
Some checks failed
Check Flake / check-flake (push) Failing after 3s
2023-04-23 20:30:41 -06:00
cd5df4cb29 try host
Some checks failed
Check Flake / check-flake (push) Has been cancelled
2023-04-23 20:23:15 -06:00
ababb5b6b7 try container
Some checks failed
Check Flake / check-flake (push) Failing after 20s
2023-04-23 20:16:42 -06:00
2a8f76e955 try container
Some checks failed
Check Flake / check-flake (push) Failing after 9s
2023-04-23 20:15:52 -06:00
de17d7c9dd try container
Some checks failed
Check Flake / check-flake (push) Failing after 16s
2023-04-23 20:14:55 -06:00
82c2bf81b7 try container
Some checks failed
Check Flake / check-flake (push) Failing after 18s
2023-04-23 20:12:16 -06:00
a48c0a3b2a try container
Some checks failed
Check Flake / check-flake (push) Failing after 9s
2023-04-23 20:11:16 -06:00
e019fccbd2 try container
Some checks failed
Check Flake / check-flake (push) Failing after 17s
2023-04-23 20:10:06 -06:00
358a0ffeed debug
Some checks failed
Check Flake / check-flake (push) Failing after 19s
2023-04-23 20:00:34 -06:00
908b9c7b29 try nix container
Some checks are pending
Check Flake / check-flake (push) Has started running
2023-04-23 19:52:23 -06:00
f4b3ec91eb debug
Some checks failed
Check Flake / check-flake (push) Failing after 28s
2023-04-23 19:49:59 -06:00
bdc0dd5656 debug
Some checks failed
Check Flake / check-flake (push) Failing after 26s
2023-04-23 19:41:29 -06:00
d9127c7623 debug
Some checks failed
Check Flake / check-flake (push) Failing after 28s
2023-04-23 19:37:52 -06:00
c99b8619b8 debug
Some checks failed
Check Flake / check-flake (push) Failing after 26s
2023-04-23 19:35:47 -06:00
c2dd0b3330 debug
Some checks failed
Check Flake / check-flake (push) Failing after 27s
2023-04-23 19:11:21 -06:00
90601f7744 debug
Some checks failed
Check Flake / check-flake (push) Failing after 7s
2023-04-23 19:09:37 -06:00
97318fed84 try installing sudo
Some checks failed
Check Flake / check-flake (push) Failing after 19s
2023-04-23 19:07:32 -06:00
34bc79b30d try installing sudo
Some checks failed
Check Flake / check-flake (push) Failing after 6s
2023-04-23 19:06:39 -06:00
233cfce663 try installing sudo
Some checks failed
Check Flake / check-flake (push) Failing after 6s
2023-04-23 19:05:15 -06:00
2cc4973a88 try installing sudo
Some checks failed
Check Flake / check-flake (push) Failing after 6s
2023-04-23 19:03:11 -06:00
d47198998b try installing sudo
Some checks failed
Check Flake / check-flake (push) Failing after 6s
2023-04-23 19:02:09 -06:00
da9193067d try installing sudo
Some checks failed
Check Flake / check-flake (push) Failing after 5s
2023-04-23 19:01:31 -06:00
886c4c5250 try installing sudo
Some checks failed
Check Flake / check-flake (push) Failing after 4s
2023-04-23 19:00:25 -06:00
b83f28df91 try docker
Some checks failed
Check Flake / check-flake (push) Failing after 4s
2023-04-23 18:15:00 -06:00
b913e5b2f8 Try to use host
Some checks failed
Check Flake / check-flake (push) Failing after 10s
2023-04-23 18:13:22 -06:00
1b6b284fa3 Add check flake action
Some checks failed
Check Flake / check-flake (push) Failing after 8s
2023-04-23 17:56:43 -06:00
4 changed files with 45 additions and 51 deletions

View File

@ -0,0 +1,38 @@
name: Check Flake
on: [push]
env:
DEBIAN_FRONTEND: noninteractive
PATH: /run/current-system/sw/bin/:/nix/var/nix/profiles/per-user/gitea-runner/profile/bin
# defaults:
# run:
# shell: nix shell nixpkgs#nodejs-18_x
jobs:
check-flake:
runs-on: nixos
steps:
# - run: node --version
# - name: Install basic dependencies
# run: apt-get update && apt-get install -y --no-install-recommends sudo curl ca-certificates xz-utils
# - name: Install Nix
# uses: https://github.com/cachix/install-nix-action@v20
# with:
# github_access_token: ${{ secrets.__GITHUB_TOKEN }}
- name: Install dependencies
run: nix profile install nixpkgs#nodejs-18_x
- name: Checkout the repository
uses: actions/checkout@v3
with:
fetch-depth: 0
# - name: Get ENV var names
# run: printenv | cut -d'=' -f1
- name: Check Flake
run: nix flake check --show-trace

View File

@ -11,12 +11,6 @@ in
type = lib.types.str;
description = lib.mdDoc "gitea runner data directory.";
};
instanceUrl = lib.mkOption {
type = lib.types.str;
};
registrationTokenFile = lib.mkOption {
type = lib.types.path;
};
};
config = lib.mkIf cfg.enable {
@ -35,13 +29,6 @@ in
};
users.groups.gitea-runner = { };
# registration token
services.gitea-runner.registrationTokenFile = "/run/agenix/gitea-runner-registration-token";
age.secrets.gitea-runner-registration-token = {
file = ../../secrets/gitea-runner-registration-token.age;
owner = "gitea-runner";
};
systemd.services.gitea-runner = {
description = "Gitea Runner";
@ -57,40 +44,7 @@ in
path = with pkgs; [ gitea-actions-runner ];
# based on https://gitea.com/gitea/act_runner/src/branch/main/run.sh
script = ''
. ${cfg.registrationTokenFile}
if [[ ! -s .runner ]]; then
try=$((try + 1))
success=0
LOGFILE="$(mktemp)"
# The point of this loop is to make it simple, when running both act_runner and gitea in docker,
# for the act_runner to wait a moment for gitea to become available before erroring out. Within
# the context of a single docker-compose, something similar could be done via healthchecks, but
# this is more flexible.
while [[ $success -eq 0 ]] && [[ $try -lt ''${10:-10} ]]; do
act_runner register \
--instance "${cfg.instanceUrl}" \
--token "$GITEA_RUNNER_REGISTRATION_TOKEN" \
--name "${config.networking.hostName}" \
--no-interactive > $LOGFILE 2>&1
cat $LOGFILE
cat $LOGFILE | grep 'Runner registered successfully' > /dev/null
if [[ $? -eq 0 ]]; then
echo "SUCCESS"
success=1
else
echo "Waiting to retry ..."
sleep 5
fi
done
fi
exec act_runner daemon
'';
};

View File

@ -6,8 +6,5 @@
];
networking.hostName = "phil";
services.gitea-runner = {
enable = true;
instanceUrl = "https://git.neet.dev";
};
services.gitea-runner.enable = true;
}

View File

@ -7,7 +7,12 @@
networking.hostName = "s0";
system.autoUpgrade.enable = true;
# system.autoUpgrade.enable = true;
# gitea runner and allow it to build ARM derivations
services.gitea-runner.enable = true;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
nix.gc.automatic = lib.mkForce false; # allow the nix store to serve as a build cache
services.iperf3.enable = true;
services.iperf3.openFirewall = true;