diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a6b07ba..2a17cb2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,10 +8,10 @@ on: jobs: nix: - runs-on: self-hosted + runs-on: ${{ matrix.system }} strategy: matrix: - system: [aarch64-linux, aarch64-darwin] + system: [x86_64-linux, aarch64-darwin] steps: - uses: actions/checkout@v4 - run: nixci build --systems "github:nix-systems/${{ matrix.system }}" -- --show-trace diff --git a/flake.lock b/flake.lock index 1b4529f..21eb7e7 100644 --- a/flake.lock +++ b/flake.lock @@ -482,6 +482,21 @@ "type": "github" } }, + "github-nix-ci": { + "locked": { + "lastModified": 1719027440, + "narHash": "sha256-VmW8WU0dAWd/Sb5U/cvpv5AtabJi0OSI+113K7DkA8Q=", + "owner": "juspay", + "repo": "github-nix-ci", + "rev": "4ad97740f34d6b12c294d87added9452aaf72de9", + "type": "github" + }, + "original": { + "owner": "juspay", + "repo": "github-nix-ci", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -1037,6 +1052,7 @@ "actualism-app": "actualism-app", "disko": "disko", "flake-parts": "flake-parts_2", + "github-nix-ci": "github-nix-ci", "home-manager": "home-manager", "nix-darwin": "nix-darwin", "nix-index-database": "nix-index-database", diff --git a/flake.nix b/flake.nix index ab54552..6c727e2 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,7 @@ ragenix.url = "github:yaxitech/ragenix"; # Software inputs + github-nix-ci.url = "github:juspay/github-nix-ci"; nixos-vscode-server.flake = false; nixos-vscode-server.url = "github:nix-community/nixos-vscode-server"; nixci.url = "github:srid/nixci"; diff --git a/nix-darwin/default.nix b/nix-darwin/default.nix index acd8b77..b659fc0 100644 --- a/nix-darwin/default.nix +++ b/nix-darwin/default.nix @@ -16,6 +16,7 @@ self.darwinModules.my-home self.nixosModules.common inputs.ragenix.darwinModules.default + inputs.github-nix-ci.darwinModules.default ]; }; }; diff --git a/nixos/default.nix b/nixos/default.nix index 203d2f8..3c5d5ac 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -25,6 +25,7 @@ self.nixosModules.my-home self.nixosModules.common inputs.ragenix.nixosModules.default + inputs.github-nix-ci.nixosModules.default ./self/self-ide.nix ./current-location.nix ]; diff --git a/nixos/github-runner.nix b/nixos/github-runner.nix new file mode 100644 index 0000000..f400941 --- /dev/null +++ b/nixos/github-runner.nix @@ -0,0 +1,8 @@ +{ + services.github-nix-ci = { + age.secretsDir = ../secrets; + personalRunners = { + "srid/nixos-config".num = 1; + }; + }; +} diff --git a/secrets/github-nix-ci/srid.token.age b/secrets/github-nix-ci/srid.token.age new file mode 100644 index 0000000..b169a9a --- /dev/null +++ b/secrets/github-nix-ci/srid.token.age @@ -0,0 +1,16 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IDk2SVhOUSB2R0d6 +YlpFb3VHV3E2TWwvbHIzUERTeklhdGhiNTdxa1NiNzFPbTVIR1ZjCjdDMHo2SVUy +NFFnWEpIUjRzSzdnaEVTRGkvUGlKMzVJcnZYY25Id0dDSkUKLT4gc3NoLWVkMjU1 +MTkgTlVtMHJRIDdmaUhYN2JjNCtDNVdDZVdsSmVwMmFpOWRjSHVLNHhJcTVYK1F2 +Vm5QQ00KRm9CalgzZVdJb2Z4aHdMVXFsY2JWNEx5MkVpRERHOStFUExTb0pYUDE5 +YwotPiBzc2gtZWQyNTUxOSAwWkxINncgTStZdklTZDJQRjc5cEk0cmlVZlQ4MDVa +VktpcVZBM0NHSHd1ZTh6L09Bbwo2c2xzQ1A5Z204RnFyd21jbnJweWlET3lVNjlq +ckkySExac0hMa29hU0prCi0+IGUvVEFSYDktZ3JlYXNlClduc3UvL3A3SWdUb2Vy +RExCZ2thWGliNUNoTCtVZzVpYnpoWmpOcldiaFhuYXloZmRnSWVyM2NCaEthOS9L +a0MKZGJuQXFDb1lZMTY2aXpxa0ZZa3RGdWwwNXVnZzRnaVFpM0ZrVUIxeDB6am95 +ZU5vWitOTwotLS0gZFB1cjY1ZGMvZEJOVTc4Z2RLWEFycVo3Smt5OVVXc3E2Q0dS +UkVNK1dsdwr2QUd3iAlkI8h4s9/zNbG8xyQxNazPukKvDQXrtOljN8HGaXIa6j/P +TdPgZEwL5Gg1qS6XzYG3ZaikinpO6kLNpOP6oQM7/d8WH7PycPOHILrkuTCqwZV4 +ZXUXZ5O67go9tOePuk+8XSiaTJU+kFVybx6AGS/DB+vgXMZIZ90= +-----END AGE ENCRYPTED FILE----- diff --git a/secrets/secrets.nix b/secrets/secrets.nix index f7c7b76..a1a5a8e 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -8,4 +8,5 @@ let in { "hedgedoc.env.age".publicKeys = users ++ systems; + "github-nix-ci/srid.token.age".publicKeys = users ++ systems; } diff --git a/systems/ax41.nix b/systems/ax41.nix index f55407b..111b4d9 100644 --- a/systems/ax41.nix +++ b/systems/ax41.nix @@ -1,4 +1,4 @@ -{ flake, pkgs, lib, ... }: +{ flake, ... }: let inherit (flake) inputs; @@ -14,6 +14,7 @@ in "${self}/nixos/docker.nix" "${self}/nixos/actualism-app.nix" "${self}/nixos/hedgedoc.nix" + "${self}/nixos/github-runner.nix" # "${self}/nixos/server/harden/basics.nix" ]; diff --git a/systems/darwin.nix b/systems/darwin.nix index 497b09d..cc0c2d8 100644 --- a/systems/darwin.nix +++ b/systems/darwin.nix @@ -1,4 +1,4 @@ -{ pkgs, flake, ... }: +{ flake, ... }: let inherit (flake) inputs; @@ -8,14 +8,11 @@ in imports = [ self.darwinModules.default "${self}/nix-darwin/zsh-completion-fix.nix" + "${self}/nixos/github-runner.nix" ]; nixpkgs.hostPlatform = "aarch64-darwin"; - - environment.systemPackages = with pkgs; [ - # macOS GUI programs - # wezterm - ]; + networking.hostName = "appreciate"; security.pam.enableSudoTouchIdAuth = true;