Skip to content

Commit

Permalink
wip gha
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanregner committed Mar 16, 2024
1 parent 82a82fb commit f188554
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Build

on:
workflow_dispatch: # allows manual triggering
push:
# schedule:
# - cron: "0 0 * * 0" # runs weekly on Sunday at 00:00

jobs:
check:
runs-on: [self-hosted]
steps:
- uses: actions/checkout@v4
- name: Run `nix flake check`
run: nix flake check
6 changes: 5 additions & 1 deletion machines/iapetus/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@
programs.ccache.enable = true;
nix.settings.extra-sandbox-paths = [ config.programs.ccache.cacheDir ];
systemd.tmpfiles.rules =
[ "d ${config.programs.ccache.cacheDir} 0770 root nixbld" ];
[ "d ${config.programs.ccache.cacheDir} 0770 root nixbld" ]
++ (let cfg = config.services.github-runners.nix-config;
in [ "d '${cfg.workDir}' 0777 - - - -" ]);

environment.systemPackages = [
config.boot.kernelPackages.perf
Expand Down Expand Up @@ -112,6 +114,7 @@
true; # Open ports in the firewall for Source Dedicated Server
};

# https://docs.github.com/en/rest/actions/self-hosted-runners#create-a-registration-token-for-a-repository
sops.secrets.github-runner-token = {
sopsFile = ../../modules/nixos/server/secrets.yaml;
key = "github_runner_token";
Expand All @@ -121,6 +124,7 @@
url = "https://github.com/nathanregner/nix-config";
tokenFile = config.sops.secrets.github-runner-token.path;
replace = true;
workDir = "/tmp/nix-config";
};

# This value determines the NixOS release from which the default
Expand Down

0 comments on commit f188554

Please sign in to comment.