Add infinsweeper module.

This commit is contained in:
2026-09-24 18:49:54 +01:00
parent 6dfde2bab6
commit 1f7b34ef78
3 changed files with 46 additions and 1 deletions
+4
View File
@@ -7,6 +7,7 @@
../../modules/cloudflare-ddns
../../modules/gitea
../../modules/msjd
../../modules/infinsweeper
];
networking.hostName = "syedm";
@@ -27,6 +28,9 @@
virtualHosts."git.syedm.dev".extraConfig = ''
reverse_proxy localhost:3000
'';
virtualHosts."infinsweeper.syedm.dev".extraConfig = ''
reverse_proxy localhost:5161
'';
virtualHosts."acs.syedm.dev".extraConfig = ''
reverse_proxy localhost:3709
'';
+1 -1
View File
@@ -17,7 +17,7 @@ IP_V6=$(@curl@/bin/curl -6 -s 'https://api6.ipify.org')
log "Detected IPv4: ${IP_V4:-none}"
log "Detected IPv6: ${IP_V6:-none}"
arr=("" "git." "www." "acs.")
arr=("" "git." "www." "acs." "infinsweeper.")
if [[ -n "$IP_V4" ]]; then
old_ip_v4=$([[ -f "$cache_v4" ]] && cat "$cache_v4" || echo "")
+41
View File
@@ -0,0 +1,41 @@
{ config, pkgs, ... }:
let
infinsweeper = "${config.users.users."me".home}/main/infinsweeper";
ruby = pkgs.ruby.withPackages (
p: with p; [
sqlite3
sequel
rackup
puma
sinatra
]
);
in
{
systemd.services.infinsweeper = {
description = "InfinSweeper";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
StateDirectory = "infinsweeper";
WorkingDirectory = infinsweeper;
ExecStart = "${ruby}/bin/ruby ${infinsweeper}/main.rb";
User = "me";
Restart = "always";
RestartSec = 3;
Environment = [
"ENV=prod"
#"RACK_ENV=production"
"PORT=5161"
"INFINSWEEPER_DB=/var/lib/infinsweeper/infinsweeper.db"
];
EnvironmentFile = "/run/secrets.env";
};
};
}