Skip to content

Commit

Permalink
Merge branch 'master' into gr-flake-module
Browse files Browse the repository at this point in the history
  • Loading branch information
srid authored Jun 12, 2024
2 parents c22cbf3 + 3a387ab commit 25be1dd
Show file tree
Hide file tree
Showing 33 changed files with 627 additions and 589 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
system: [aarch64-linux, aarch64-darwin]
steps:
- uses: actions/checkout@v4
- run: nixci build --systems "github:nix-systems/${{ matrix.system }}"
- run: nixci build --systems "github:nix-systems/${{ matrix.system }}" -- --show-trace
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"b4dm4n.nixpkgs-fmt",
"jnoortheen.nix-ide",
"mattn.lisp",
"thenuprojectcontributors.vscode-nushell-lang",
"mkhl.direnv"
]
}
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"nixEnvSelector.nixFile": "${workspaceRoot}/shell.nix",
"search.followSymlinks": false,
"editor.defaultFormatter": "B4dM4n.nixpkgs-fmt",
"editor.formatOnSave": true,
"editor.formatOnType": true
"editor.formatOnType": true,
"nix.enableLanguageServer": true,
"nix.serverPath": "nixd"
}
5 changes: 5 additions & 0 deletions clusters/github-runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ While we could use the `nix-darwin` module for Github Runners, we do it the othe
- The Linux VM's `/etc/ssh/ssh_host_ed25519_key` is used to authorize itself to connect to the Mac.
- The author has observed the official "linux-builder" to be slow, in comparison to a Parallels VM. Prefer setting up a Parallels VM if you can.

## Known Issues

- GitHub token must be provided to avoid the "API rate limit exceeded" error (which can happen if you do all this on your laptop and work around the world). See https://github.com/srid/nixos-config/issues/54
- GitHub runner might crash due to out of sync time on the VM. If you are Parallels, you should [sync time from Mac](https://kb.parallels.com/113271).

## Usage

- `/systems/darwin.nix` (macOS config)
Expand Down
6 changes: 6 additions & 0 deletions clusters/github-runner/nixos-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ let
inherit user group tokenFile name;
enable = true;
replace = true;
ephemeral = true;
extraPackages = with pkgs; runner-pkgs ++ [
# Standard nix tools
nixci
Expand All @@ -39,6 +40,11 @@ in
users.groups.${group} = { };
nix.settings.trusted-users = [ user ];

# No way to do this: https://github.com/NixOS/nix/issues/6536
#nix.extraOptions = ''
# !include /run/keys/nix-conf-gh-token.secret
#'';

# Runners
services.github-runners = mkPersonalRunners "srid" repos.srid;

Expand Down
2 changes: 2 additions & 0 deletions clusters/github-runner/repos.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
nixos-config.num = 2;
nixos-flake.num = 2 * 5;
perpetuum.num = 2;
emanote.num = 2;
nixci.num = 2;
};
}
Loading

0 comments on commit 25be1dd

Please sign in to comment.