fix for Genesis and Isaiah
buildbot/nix-eval Build done. (2 warnings)
buildbot/nix-build Build done.
buildbot/nix-effects Build done.

Get gitea-actions running on Isaiah
Fix adblock upate on Genesis
This commit is contained in:
Greg Hellings
2025-12-30 20:21:16 -06:00
parent 125c898c72
commit c51e2e5810
7 changed files with 96 additions and 26 deletions
-12
View File
@@ -1,12 +0,0 @@
#!/usr/bin/env bash
set -ex
curl -s https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | sed '1,33d' > /etc/adblock_hosts
curl -s https://adaway.org/hosts.txt | sed '1,24d' | sed 's/127.0.0.1/0.0.0.0/' >> /etc/adblock_hosts
# Custom domains that I need to preserve for some reason
for f in "segment.com" "segment.io" "branch.io" "dev.visualwebsiteoptimizer.com"; do
sed -i -e "/${f}/d" /etc/adblock_hosts # Blocks Trelly content for house investors
done
systemctl restart dnsmasq
+38 -1
View File
@@ -2,8 +2,29 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ pkgs, ... }:
{ lib, pkgs, ... }:
let
adblockUpdate = pkgs.writeShellApplication {
name = "adblock-update";
runtimeInputs = with pkgs; [
curl
gnused
systemd
];
text = ''
curl -s https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | sed '1,33d' > /etc/adblock_hosts
curl -s https://adaway.org/hosts.txt | sed '1,24d' | sed 's/127.0.0.1/0.0.0.0/' >> /etc/adblock_hosts
# Custom domains that I need to preserve for some reason
for f in "segment.com" "segment.io" "branch.io" "dev.visualwebsiteoptimizer.com"; do
sed -i -e "/''${f}/d" /etc/adblock_hosts # Blocks Trelly content for house investors
done
systemctl restart dnsmasq
'';
};
in
{
imports = [
# Include the results of the hardware scan.
@@ -36,4 +57,20 @@
];
networking.hostName = "genesis"; # Define your hostname.
systemd = {
services.adblock-update = {
after = [ "network-online.target" ];
script = lib.getExe adblockUpdate;
serviceConfig.Type = "oneshot";
};
timers.adblock-update = {
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
timerConfig = {
OnCalendar = "daily";
Unit = "adblock-update.service";
};
};
};
}
-12
View File
@@ -12,7 +12,6 @@ let
routerIP = metadata.infra.gw;
extraHosts = builtins.readFile ./net/hosts;
adblockUpdate = pkgs.writeShellScriptBin "adblockUpdate" (builtins.readFile ./adblockUpdate.sh);
proxyPort = 3128;
dnsPort = 53;
dhcpPort = 67;
@@ -111,19 +110,8 @@ in
};
};
# Update adblock list
cron = {
enable = true;
systemCronJobs = [ "* * * * * root ${adblockUpdate} 2>&1 > /var/log/adblock.log" ];
};
prometheus.exporters = {
dnsmasq.enable = true;
kea = {
enable = true;
openFirewall = true;
targets = [ (builtins.head config.services.kea.dhcp4.settings.control-sockets).socket-name ];
};
};
}; # End of services configuration
+33
View File
@@ -10,6 +10,7 @@
];
age.secrets = {
gitea-runner-isaiah-podman.file = ../../secrets/gitea/runner-isaiah-podman.age;
gitea-workerPassword.file = ../../secrets/gitea/workerPassword.age;
runner-reg.file = ../../secrets/gitlab/kubernetes-k3s-local.age;
};
@@ -41,6 +42,7 @@
vip = metadata.hosts.${config.networking.hostName}.ip;
priority = 255;
};
podman.enable = true;
tailscale = {
enable = true;
tags = [ "home" ];
@@ -72,6 +74,37 @@
};
services = {
gitea-actions-runner.instances.podman = {
enable = true;
labels = [
"debian-latest:docker://node:25-trixie"
"ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest"
"ubuntu-24.04:docker://docker.gitea.com/runner-images:ubuntu-24.04"
"ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04"
"ubuntu-full-latest:docker://ghcr.io/catthehacker/ubuntu:full-latest"
"ubuntu-full-24.04:docker://ghcr.io/catthehacker/ubuntu:full-24.04"
"ubuntu-full-22.04:docker://ghcr.io/catthehacker/ubuntu:full-22.04"
"ubuntu-act-latest:docker://ghcr.io/catthehacker/ubuntu:act-latest"
"ubuntu-act-24.04:docker://ghcr.io/catthehacker/ubuntu:act-24.04"
"ubuntu-act-22.04:docker://ghcr.io/catthehacker/ubuntu:act-22.04"
"ubuntu-runner-latest:docker://ghcr.io/catthehacker/ubuntu:runner-latest"
"ubuntu-runner-24.04:docker://ghcr.io/catthehacker/ubuntu:runner-24.04"
"ubuntu-runner-22.04:docker://ghcr.io/catthehacker/ubuntu:runner-22.04"
"ubuntu-rust-latest:docker://ghcr.io/catthehacker/ubuntu:rust-latest"
"ubuntu-rust-24.04:docker://ghcr.io/catthehacker/ubuntu:rust-24.04"
"ubuntu-rust-22.04:docker://ghcr.io/catthehacker/ubuntu:rust-22.04"
"nix-latest:docker://src.thehellings.com/greg/builder:latest"
];
name = "isaiah-podman";
tokenFile = config.age.secrets.gitea-runner-isaiah-podman.path;
url = "https://gitea.shire-zebra.ts.net";
};
k3s.clusterInit = true; # This is the first node in the cluster
openssh = {
enable = true;