Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
Simon Bruder | e8cb5f3af2 | ||
Simon Bruder | e343709b50 | ||
Simon Bruder | 01d8f09897 | ||
Simon Bruder | bdb1e45173 |
15
machines/ci-runner/README.md
Normal file
15
machines/ci-runner/README.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
|
||||
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
-->
|
||||
|
||||
# ci-runner
|
||||
|
||||
## Hardware
|
||||
|
||||
QEMU/KVM virtual machine on [koyomi](../koyomi/README.md).
|
||||
|
||||
## Purpose
|
||||
|
||||
It will serve as a CI runner for Forgejo.
|
31
machines/ci-runner/configuration.nix
Normal file
31
machines/ci-runner/configuration.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
# SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules
|
||||
];
|
||||
|
||||
sbruder = {
|
||||
full = false;
|
||||
#wireguard.home.enable = true;
|
||||
};
|
||||
|
||||
networking.hostName = "ci-runner";
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
#services.gitea-actions-runner = {
|
||||
# package = pkgs.forgejo-runner;
|
||||
# instances = {
|
||||
# personal = {
|
||||
# enable = true;
|
||||
# url = "https://git.sbruder.de";
|
||||
# };
|
||||
# };
|
||||
#};
|
||||
}
|
56
machines/ci-runner/hardware-configuration.nix
Normal file
56
machines/ci-runner/hardware-configuration.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
# SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
{ modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
sbruder.machine.isVm = true;
|
||||
|
||||
boot = {
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
extraModulePackages = [ ];
|
||||
kernelParams = [ ];
|
||||
initrd = {
|
||||
availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ];
|
||||
kernelModules = [ ];
|
||||
};
|
||||
loader = {
|
||||
grub.enable = false;
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/e1a9b0bb-9f04-498c-ac2f-aad9da4639f3";
|
||||
fsType = "btrfs";
|
||||
options = [ "compress=zstd" "discard" "noatime" "ssd" ]; # for some reason, the kernel assumes rotational
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/7A51-7897";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
useDHCP = false;
|
||||
usePredictableInterfaceNames = false;
|
||||
};
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks = {
|
||||
eth0 = {
|
||||
name = "eth0";
|
||||
DHCP = "yes";
|
||||
domains = [ "sbruder.de" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -85,4 +85,9 @@ in
|
|||
|
||||
targetHost = "koyomi.sbruder.de";
|
||||
};
|
||||
ci-runner = {
|
||||
system = "x86_64-linux";
|
||||
|
||||
targetHost = "ci-runner.sbruder.de";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
lib.mkIf (config.sbruder.wireguard.home.enable && !config.sbruder.machine.isVm) {
|
||||
services.prometheus.exporters.smartctl = {
|
||||
enable = config.sbruder.wireguard.home.enable && !config.sbruder.machine.isVm;
|
||||
enable = true;
|
||||
listenAddress = config.sbruder.wireguard.home.address;
|
||||
# devices need to be specified for all systems that use NVMe
|
||||
# https://github.com/NixOS/nixpkgs/issues/210041
|
||||
|
|
Loading…
Reference in a new issue