96 lines
2.5 KiB
Nix
96 lines
2.5 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
|
modpack = pkgs.fetchPackwizModpack {
|
|
url = "https://git.malice.zone/alisceon/tfcpack/-/raw/main/pack.toml";
|
|
packHash = "sha256-0f3ql6825fa7qx5lacjzhanfs87r4i4591x7y2lazc3vic8hp2i6";
|
|
};
|
|
in
|
|
{
|
|
security.sudo.wheelNeedsPassword = false;
|
|
imports =
|
|
[ ./hardware-configuration.nix ];
|
|
networking.hostName = "tesla-nixos";
|
|
boot.initrd.enable = true;
|
|
boot.loader = {
|
|
systemd-boot = {
|
|
enable = true;
|
|
}; # end loader.systemd-boot
|
|
}; # end boot
|
|
virtualisation.oci-containers.containers = {
|
|
isponsorblocktv = {
|
|
image = "ghcr.io/dmunozv04/isponsorblocktv:latest";
|
|
autoStart = true;
|
|
volumes = [
|
|
"/home/alisceon/isponsorblocktv:/app/data"
|
|
];
|
|
}; # end isponsorblocktv
|
|
};
|
|
virtualisation.podman.dockerCompat = false;
|
|
virtualisation.docker = {
|
|
enable = true;
|
|
autoPrune = {
|
|
enable = true;
|
|
dates = "daily";
|
|
};
|
|
daemon.settings = {
|
|
"runtimes" = {
|
|
crun = { path = "${pkgs.crun}/bin/crun"; };
|
|
};
|
|
"default-runtime" = "crun";
|
|
};
|
|
};
|
|
|
|
nixpkgs.overlays = [ inputs.nix-minecraft.overlay ];
|
|
services.minecraft-servers = {
|
|
enable = true;
|
|
eula = true;
|
|
openFirewall = true;
|
|
servers.fabric = {
|
|
enable = true;
|
|
package = pkgs.neoforgeServers.neoforge-1_21_1.override {
|
|
loaderVersion = "21.1.219";
|
|
};
|
|
symlinks = {
|
|
"mods" = "${modpack}/mods";
|
|
};
|
|
};
|
|
};
|
|
|
|
users.users.gitlab-runner = {
|
|
isNormalUser = true;
|
|
home = "/var/lib/gitlab-runner";
|
|
createHome = true;
|
|
shell = pkgs.bashInteractive;
|
|
extraGroups = [ "docker" "wheel" ];
|
|
group = "gitlab-runner";
|
|
};
|
|
users.groups.gitlab-runner = { };
|
|
users.groups.docker = { };
|
|
systemd.services."enable-linger-gitlab-runner" = {
|
|
description = "Enable linger for gitlab-runner";
|
|
wantedBy = [ "multi-user.target" ];
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
ExecStart = "${pkgs.systemd}/bin/loginctl enable-linger gitlab-runner";
|
|
RemainAfterExit = true;
|
|
};
|
|
};
|
|
|
|
# GitLab Runner configured to use the local Docker daemon
|
|
services.gitlab-runner = {
|
|
enable = true;
|
|
services = {
|
|
ci-nspawn-docker = {
|
|
authenticationTokenConfigFile = "/var/lib/gitlab-runner/token-env";
|
|
executor = "docker";
|
|
dockerImage = "alpine:3";
|
|
dockerPrivileged = true;
|
|
dockerVolumes = [
|
|
"/var/lib/gitlab-runner/cache:/cache"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
} # end file
|
|
|