nixos_config/hosts/tesla-nixos/configuration.nix

74 lines
1.9 KiB
Nix
Raw Normal View History

2025-09-29 18:03:24 +02:00
{ config, pkgs, lib, ... }:
2025-08-12 21:00:01 +02:00
{
2025-09-29 15:56:43 +02:00
security.sudo.wheelNeedsPassword = false;
2025-08-12 21:00:01 +02:00
imports =
[ ./hardware-configuration.nix ];
networking.hostName = "tesla-nixos";
boot.initrd.enable = true;
boot.loader = {
systemd-boot = {
enable = true;
}; # end loader.systemd-boot
}; # end boot
2025-09-24 18:23:45 +02:00
virtualisation.oci-containers.containers = {
isponsorblocktv = {
image = "ghcr.io/dmunozv04/isponsorblocktv:latest";
autoStart = true;
volumes = [
2025-09-24 18:33:20 +02:00
"/home/alisceon/isponsorblocktv:/app/data"
2025-09-24 18:31:24 +02:00
];
2025-09-24 18:23:45 +02:00
}; # end isponsorblocktv
};
2025-09-30 20:03:13 +02:00
virtualisation.podman.dockerCompat = false;
virtualisation.docker = {
2025-09-29 17:51:11 +02:00
enable = true;
autoPrune = {
enable = true;
dates = "daily";
2025-09-29 11:23:45 +02:00
};
daemon.settings = {
"runtimes" = {
crun = { path = "${pkgs.crun}/bin/crun"; };
2025-09-29 11:23:45 +02:00
};
"default-runtime" = "crun";
};
};
users.users.gitlab-runner = {
2025-09-30 20:02:47 +02:00
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;
};
};
2025-09-29 11:23:45 +02:00
# 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"
];
2025-09-29 18:01:37 +02:00
};
2025-09-29 17:32:31 +02:00
};
};
2025-08-12 21:00:01 +02:00
} # end file
2025-09-29 11:23:45 +02:00