{ config, lib, ... }: let cfg = config.py.services.buildbot.worker; in { options.py.services.buildbot.worker = { enable = lib.mkEnableOption "buildbot worker"; passwordFile = lib.mkOption { type = lib.types.path; description = "Password file for the worker"; default = null; }; }; config.services.buildbot-nix.worker = lib.mkIf cfg.enable { enable = true; name = config.networking.hostName; masterUrl = "tcp:host=marvin:port=6915"; workerPasswordFile = cfg.passwordFile; }; }