Compare commits

..
2 Commits
Author SHA1 Message Date
ahtlon 51960e200e [initssh] document new option
Hydra callback / on_pr (pull_request) Successful in 1m7s
Hydra callback / on_push (pull_request) Skipped
Check flake syntax / flake-check (push) Successful in 9m12s
2026-10-16 20:51:12 +02:00
ahtlon db72f30b56 [initssh] set static ip 2026-10-16 20:47:58 +02:00
8 changed files with 22 additions and 14 deletions
+11 -1
View File
@@ -26,4 +26,14 @@ Run ` lspci -k | grep -iA4 ethernet `
` [ ] ` ` [ ] `
*Example:* *Example:*
`[ "r8169" ]` `[ "r8169" ]`
## cfg.ip
I hate DHCP! Set static ip or ip = hosts.malobeo.hosts.${hostname}.network.address;
*Default:*
`Null` - Will error when not set
*Example:*
`hosts.malobeo.hosts.fanny.network.address;`
+1
View File
@@ -72,6 +72,7 @@ in
enable = true; enable = true;
authorizedKeys = sshKeys.admins; authorizedKeys = sshKeys.admins;
ethernetDrivers = ["e1000e"]; ethernetDrivers = ["e1000e"];
ip = hosts.malobeo.hosts.albert.network.address;
}; };
services.malobeo.vpn = { services.malobeo.vpn = {
-1
View File
@@ -20,7 +20,6 @@
services.malobeo.gitea-translator = { services.malobeo.gitea-translator = {
enable = true; enable = true;
host = "0.0.0.0";
}; };
services.hydra = { services.hydra = {
+3
View File
@@ -2,6 +2,8 @@
let let
sshKeys = import ../ssh_keys.nix; sshKeys = import ../ssh_keys.nix;
hosts = import ../hosts.nix {};
in in
{ {
imports = imports =
@@ -35,6 +37,7 @@ in
enable = true; enable = true;
authorizedKeys = sshKeys.admins; authorizedKeys = sshKeys.admins;
ethernetDrivers = ["r8169"]; ethernetDrivers = ["r8169"];
ip = hosts.malobeo.hosts.bakunin.network.address;
}; };
malobeo.users.malobeo = true; malobeo.users.malobeo = true;
+1
View File
@@ -90,6 +90,7 @@ in
authorizedKeys = sshKeys.admins; authorizedKeys = sshKeys.admins;
ethernetDrivers = ["r8169"]; ethernetDrivers = ["r8169"];
zfsExtraPools = [ "storage" ]; zfsExtraPools = [ "storage" ];
ip = hosts.malobeo.hosts.fanny.network.address;
}; };
boot.initrd = { boot.initrd = {
+5 -1
View File
@@ -27,6 +27,10 @@ in
default = [ ]; default = [ ];
description = "Name or GUID of extra ZFS pools that you wish to import during boot."; description = "Name or GUID of extra ZFS pools that you wish to import during boot.";
}; };
ip = lib.mkOption {
type = lib.types.str;
description = "The requested static ip for the machine";
};
}; };
config = lib.mkIf (cfg.enable && config.malobeo.disks.encryption) { config = lib.mkIf (cfg.enable && config.malobeo.disks.encryption) {
@@ -73,7 +77,7 @@ in
"/etc/ssh/initrd" = "/etc/ssh/initrd"; "/etc/ssh/initrd" = "/etc/ssh/initrd";
}; };
}; };
kernelParams = [ "ip=::::${hostName}-initrd::dhcp" ]; kernelParams = [ "ip=${cfg.ip}::::${hostName}::" ];
}; };
}; };
} }
-1
View File
@@ -145,7 +145,6 @@ in
"https://keys.malobeo.org" "https://keys.malobeo.org"
"https://tasklist.malobeo.org" "https://tasklist.malobeo.org"
"https://zines.malobeo.org" "https://zines.malobeo.org"
"http://${hosts.malobeo.hosts.albert.network.address}:27364/health"
]; ];
}]; }];
+1 -10
View File
@@ -26,7 +26,7 @@ def _parse_response(baseurl, owner, repo):
return pulls return pulls
class PullsHandler(BaseHTTPRequestHandler): class PullsHandler(BaseHTTPRequestHandler):
_VALID_PATHS={"/", "/gitea-pulls-sorted.json", "/health"} _VALID_PATHS={"/", "/gitea-pulls-sorted.json"}
# Class variables to store configuration # Class variables to store configuration
baseurl = None baseurl = None
@@ -34,15 +34,6 @@ class PullsHandler(BaseHTTPRequestHandler):
repo = None repo = None
def do_GET(self): def do_GET(self):
if self.path == "/health":
body=json.dumps({"status": "ok"}).encode("utf-8")
self.send_response(200)
self.send_header("Content-Type", "application/json; charset=utf-8")
self.send_header("Content-Length", str(len(body)))
self.end_headers()
self.wfile.write(body)
return
if self.path not in self._VALID_PATHS: if self.path not in self._VALID_PATHS:
self.send_error(404, "Not Found") self.send_error(404, "Not Found")
return return