2023-07-15 22:54:03 +01:00
|
|
|
{
|
2024-02-05 13:13:44 +00:00
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
imports = [
|
|
|
|
# Include the results of the hardware scan.
|
|
|
|
./hardware.nix
|
|
|
|
];
|
2023-11-07 12:33:12 +00:00
|
|
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
2024-02-05 13:13:44 +00:00
|
|
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
2023-07-15 22:54:03 +01:00
|
|
|
boot.tmp.cleanOnBoot = true;
|
|
|
|
zramSwap.enable = true;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
vim
|
|
|
|
wget
|
|
|
|
git
|
|
|
|
htop
|
|
|
|
tailscale
|
|
|
|
];
|
|
|
|
|
|
|
|
services.gitea-actions-runner = {
|
2023-09-05 21:44:01 +01:00
|
|
|
package = pkgs.forgejo-actions-runner;
|
2023-07-19 11:59:28 +01:00
|
|
|
instances = {
|
|
|
|
oracle-arm = {
|
|
|
|
name = "oracle-arm";
|
|
|
|
enable = true;
|
|
|
|
labels = [
|
|
|
|
"debian-latest-arm:docker://node:18-bullseye"
|
|
|
|
];
|
2023-09-05 21:44:01 +01:00
|
|
|
url = "https://git.gmem.ca";
|
2023-12-08 23:41:29 +00:00
|
|
|
token = "dcSqNPRfeAFjAA2NUzZRbO4Q2k1L2WOOCAEAhPR4";
|
2023-08-15 21:38:06 +01:00
|
|
|
settings = {
|
|
|
|
cache.port = 4328;
|
|
|
|
};
|
2023-07-15 22:54:03 +01:00
|
|
|
};
|
|
|
|
};
|
2023-07-19 11:59:28 +01:00
|
|
|
};
|
2023-07-15 22:54:03 +01:00
|
|
|
|
|
|
|
programs.zsh.enable = true;
|
|
|
|
programs.fish.enable = true;
|
2024-02-05 13:13:44 +00:00
|
|
|
environment.shells = with pkgs; [zsh fish];
|
2023-07-15 22:54:03 +01:00
|
|
|
|
2023-08-15 21:38:06 +01:00
|
|
|
networking = {
|
2023-09-05 21:44:01 +01:00
|
|
|
hostName = "forgejo-action-runner";
|
2023-08-15 21:38:06 +01:00
|
|
|
domain = "gmem.ca";
|
2024-02-05 13:13:44 +00:00
|
|
|
nameservers = ["1.1.1.1" "1.0.0.1"];
|
2023-08-15 21:38:06 +01:00
|
|
|
firewall = {
|
|
|
|
trustedInterfaces = ["tailscale0"];
|
|
|
|
checkReversePath = "loose";
|
|
|
|
enable = true;
|
2024-02-05 13:13:44 +00:00
|
|
|
allowedTCPPorts = [22 80 443 4328];
|
|
|
|
allowedUDPPorts = [];
|
2023-08-15 21:38:06 +01:00
|
|
|
};
|
|
|
|
nftables.enable = true;
|
|
|
|
};
|
2024-02-05 13:13:44 +00:00
|
|
|
|
2023-07-15 22:54:03 +01:00
|
|
|
users.users = {
|
2023-12-08 23:41:29 +00:00
|
|
|
root.openssh.authorizedKeys.keys = let
|
|
|
|
authorizedKeys = pkgs.fetchurl {
|
|
|
|
url = "https://gmem.ca/ssh";
|
|
|
|
hash = "sha256-7PpFDgWVfp26c9PuW+2s3O8MBAODtHr4q7WU/l3BoG4=";
|
|
|
|
};
|
2024-02-05 13:13:44 +00:00
|
|
|
in
|
|
|
|
pkgs.lib.splitString "\n" (builtins.readFile
|
|
|
|
authorizedKeys);
|
2023-07-15 22:54:03 +01:00
|
|
|
};
|
|
|
|
virtualisation = {
|
|
|
|
docker = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
};
|
2024-02-05 13:13:44 +00:00
|
|
|
|
2023-07-15 22:54:03 +01:00
|
|
|
services.openssh.enable = true;
|
|
|
|
services.tailscale.enable = true;
|
2023-09-05 21:44:01 +01:00
|
|
|
system.stateVersion = "23.11";
|
2023-07-15 22:54:03 +01:00
|
|
|
}
|