nixos_forgejo/ci-runner/configuration.nix

116 lines
3.2 KiB
Nix
Raw Permalink Normal View History

2024-02-16 02:49:57 +01:00
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`).
{ config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
];
# Enable Flakes and the new command-line tool
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Set default editor to vim
environment.variables.EDITOR = "vim";
# Use UEFI
boot.loader.systemd-boot.enable = true;
# Use the GRUB 2 boot loader.
#boot.loader.grub.enable = true;
#boot.loader.grub.device = "/dev/sda";
networking.hostName = "forgejo-ci"; # Define your hostname.
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Define a user account. Don't forget to set a password with passwd.
users.users.lyn = {
isNormalUser = true;
extraGroups = [ "wheel"];
openssh.authorizedKeys.keys = [
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBMQfF+7FQO57dTmnhm0NLL4Av0g6yKLsfZlDFll+sCqyJJ0r1kSIGAumcXTVRjfwJIGXKZDU1+D4h1skd1gzFqM= forgejo-ci@secretive.Macbuch-Pro.local"
];
packages = with pkgs; [
];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
git
vim
wget
curl
2024-02-16 03:40:25 +01:00
docker
2024-02-16 02:49:57 +01:00
pkgs.forgejo-actions-runner
2024-02-16 03:40:25 +01:00
];
2024-02-16 03:42:18 +01:00
# Enable docker
virtualisation.docker = {
enable = true;
daemon.settings = {
fixed-cidr-v6 = "fd00::/80";
ipv6 = true;
};
};
2024-02-16 02:49:57 +01:00
# Forgejo actions runner
2024-02-16 03:40:25 +01:00
services.gitea-actions-runner = {
2024-02-16 03:42:18 +01:00
instances = {
"shibepro-ci" = {
enable = true;
2024-02-16 03:40:25 +01:00
url = "https://git.shibe.pro";
name = "shibepro-ci";
2024-02-16 04:31:51 +01:00
tokenFile = "/etc/nixos/ci-token";
2024-02-16 03:40:25 +01:00
labels = [];
2024-02-16 03:42:18 +01:00
};
2024-02-16 03:40:25 +01:00
};
};
2024-02-16 03:42:18 +01:00
2024-02-16 02:49:57 +01:00
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings = {
X11Forwarding = true;
PermitRootLogin = "no";
PasswordAuthentication = false;
};
openFirewall = true;
};
#enable qemu-guestagent
services.qemuGuest.enable = true;
# Disable password checking for wheel group users so we can solely rely on ssh keys
security.sudo.wheelNeedsPassword = false;
# Firewall stuff:
networking.firewall.enable = true;
networking.firewall.allowPing = true;
# Open ports in the firewall.
2024-02-16 04:33:19 +01:00
# networking.firewall.allowedTCPPorts = [ ... ];
2024-02-16 02:49:57 +01:00
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
}