···11+# sigexec executor: signed remote command execution as root, for
22+# administration. The signature is the authorization — commands are signed in
33+# the browser (passkey) or by the CLI's local ed25519 key, verified against
44+# the key list below; no shell parses them, argv runs literally.
55+#
66+# There is no TLS here: the port is opened on retiolum only, and the dashboard
77+# on neoprism (./dashboard.nix) proxies browser/CLI traffic to it. Machines
88+# not reachable over retiolum (starkstrom) additionally put their own nginx in
99+# front; see machines/starkstrom/config.nix.
1010+let
1111+ # Must match the executor URLs registered in ./dashboard.nix.
1212+ executorPort = 7601;
1313+ domain = "sigexec.lassul.us";
1414+in
1515+{ self, ... }:
1616+{
1717+ imports = [ self.inputs.sigexec.nixosModules.executor ];
1818+1919+ services.sigexec-executor = {
2020+ enable = true;
2121+ # root deliberately: this executor's purpose is administration, and the
2222+ # executor's privileges are the jobs' privileges.
2323+ user = "root";
2424+ group = "root";
2525+ # ssh-style: login shell env, bare command names work.
2626+ login = true;
2727+ # Wildcard dual-stack bind; reachability is the firewall's job below.
2828+ listen = "[::]:${toString executorPort}";
2929+ # Browser passkeys sign against the dashboard's origin.
3030+ rpId = domain;
3131+ origins = [ "https://${domain}" ];
3232+ authorizedKeys = [
3333+ "ed25519 RhYj8TzT8w3q50Oi3-q7U1KLRLrm66FltogC15ootJg read,request lass@ignavia"
3434+ "webauthn-es256 MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZPkoTMJKVdsC-_m8wPrKrJiCKVcZLdJarMTzF8JQFJUKmYlqY_34oQr1u9wCMTQZFU541Jmje1ri9z20XmsXpQ 6KpUo9EZQrmOCQ0vVwgnbw read,write lass@ignavia"
3535+ ];
3636+ };
3737+3838+ # Reachable from the mesh only; the dashboard proxies for the outside world.
3939+ networking.firewall.interfaces.retiolum.allowedTCPPorts = [ executorPort ];
4040+}