Add oracle cloud based ARM runner for forge
All checks were successful
Lint / lint (push) Successful in 7s
All checks were successful
Lint / lint (push) Successful in 7s
This commit is contained in:
parent
1ddd8a336c
commit
959bf8253c
|
@ -5,28 +5,16 @@ let
|
|||
lib = import "${krops}/lib";
|
||||
pkgs = import "${krops}/pkgs" {};
|
||||
|
||||
dev-vm-source = lib.evalSource [
|
||||
oracle-gitea-runner-source = lib.evalSource [
|
||||
{
|
||||
nixpkgs.git = {
|
||||
ref = "origin/nixos-22.11";
|
||||
ref = "0a4f20e1867ebb798ba5ed51b9db52a09ba6623d";
|
||||
url = https://github.com/NixOS/nixpkgs;
|
||||
|
||||
shallow = true;
|
||||
};
|
||||
nixos-config.file = toString ./dev-vm/configuration.nix;
|
||||
hardware.file = toString ./dev-vm/hardware.nix;
|
||||
}
|
||||
];
|
||||
ipad-dev-source = lib.evalSource [
|
||||
{
|
||||
nixpkgs.git = {
|
||||
ref = "origin/nixos-22.11";
|
||||
url = https://github.com/NixOS/nixpkgs;
|
||||
};
|
||||
home-manager.git = {
|
||||
ref = "origin/release-22.11";
|
||||
url = https://github.com/nix-community/home-manager;
|
||||
};
|
||||
nixos-config.file = toString ./ipad-dev/configuration.nix;
|
||||
"hardware.nix".file = toString ./ipad-dev/hardware.nix;
|
||||
nixos-config.file = toString ./oracle-gitea-runner/configuration.nix;
|
||||
"hardware.nix".file = toString ./oracle-gitea-runner/hardware.nix;
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -69,13 +57,9 @@ let
|
|||
];
|
||||
|
||||
in {
|
||||
dev-vm = pkgs.krops.writeDeploy "dev-vm" {
|
||||
source = dev-vm-source;
|
||||
target = "root@192.168.50.126";
|
||||
};
|
||||
ipad-dev = pkgs.krops.writeDeploy "ipad-dev" {
|
||||
source = ipad-dev-source;
|
||||
target = "root@143.47.234.244";
|
||||
oracle-gitea-runner = pkgs.krops.writeDeploy "oracle-gitea-runner" {
|
||||
source = oracle-gitea-runner-source;
|
||||
target = "root@130.162.169.74";
|
||||
};
|
||||
nas = pkgs.krops.writeDeploy "nas" {
|
||||
source = nas-source;
|
||||
|
|
58
krops/oracle-gitea-runner/configuration.nix
Normal file
58
krops/oracle-gitea-runner/configuration.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware.nix
|
||||
];
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
zramSwap.enable = true;
|
||||
networking.hostName = "gitea-arm-runner";
|
||||
networking.domain = "gmem.ca";
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
wget
|
||||
git
|
||||
htop
|
||||
tailscale
|
||||
];
|
||||
|
||||
services.gitea-actions-runner = {
|
||||
instances = {
|
||||
oracle-arm = {
|
||||
name = "oracle-arm";
|
||||
enable = true;
|
||||
labels = [
|
||||
"debian-latest-arm:docker://node:18-bullseye"
|
||||
"arm:host"
|
||||
];
|
||||
url = "https://vancouver.scorpion-ghost.ts.net/git";
|
||||
token = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.fish.enable = true;
|
||||
environment.shells = with pkgs; [ zsh fish ];
|
||||
|
||||
users.users = {
|
||||
root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILIztwQxt+jqroFONSgq+xzPMuE2I5Dq/zWPQ8RcTYJr"
|
||||
];
|
||||
};
|
||||
virtualisation = {
|
||||
docker = {
|
||||
enable = true;
|
||||
rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
services.tailscale.enable = true;
|
||||
system.stateVersion = "23.05";
|
||||
}
|
15
krops/oracle-gitea-runner/hardware.nix
Normal file
15
krops/oracle-gitea-runner/hardware.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
boot.loader.grub = {
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
device = "nodev";
|
||||
};
|
||||
fileSystems."/boot/efi" = { device = "/dev/disk/by-uuid/CC2E-AEC0"; fsType = "vfat"; };
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" ];
|
||||
boot.initrd.kernelModules = [ "nvme" ];
|
||||
fileSystems."/" = { device = "/dev/mapper/ocivolume-root"; fsType = "xfs"; };
|
||||
|
||||
}
|
Loading…
Reference in a new issue