Add NixOS host modules and runners

This commit is contained in:
Dmitry
2026-05-29 22:11:41 +03:00
parent 86fb248d85
commit e715d577b1
11 changed files with 144 additions and 61 deletions
+65
View File
@@ -0,0 +1,65 @@
{ ... }:
{
imports = [
../../modules/base.nix
../../modules/docker.nix
../../modules/libvirtd.nix
../../modules/firewall-mini-pc.nix
./hardware.nix
];
networking = {
hostName = "mini-pc";
useDHCP = false;
};
systemd.network = {
enable = true;
networks."10-lan" = {
matchConfig.Name = "en*";
networkConfig = {
Address = "192.168.1.10/24";
Gateway = "192.168.1.1";
DNS = [
"192.168.1.1"
"1.1.1.1"
];
};
};
};
services.resolved.enable = false;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
services.zerotierone = {
enable = true;
joinNetworks = [
"743993800fa5a34c"
];
};
systemd.tmpfiles.rules = [
"d /opt/data/adguard 0755 ada users - -"
"d /opt/data/adguard/work 0755 ada users - -"
"d /opt/data/caddy 0755 ada users - -"
"d /opt/data/gitea-runner 0755 ada users - -"
"d /opt/data/uptime-kuma 0755 ada users - -"
"d /opt/data/vaultwarden 0755 ada users - -"
"d /opt/data/zerotier 0755 ada users - -"
"d /opt/configs/adguard 0755 ada users - -"
"d /opt/configs/caddy 0755 ada users - -"
"d /opt/configs/caddy/lego 0755 ada users - -"
];
services.gitea-actions-runner.instances."mini-pc-nixos" = {
name = "mini-pc-nixos";
url = "https://git.example.com"; # поменяй на свой URL
tokenFile = "/etc/gitea-runner/mini-pc-nixos.token";
labels = [ "mini-pc-nixos" ];
};
system.stateVersion = "25.11";
}