anchor.diff:        cfg.package
       ]) eachGeth);
   
  -    systemd.services = mapAttrs' (gethName: cfg: (
  +    systemd.services = mapAttrs' (gethName: cfg: let
  +      stateDir = "goethereum/${gethName}/${if (cfg.network == null) then "mainnet" else cfg.network}";
  +      dataDir = "/var/lib/${stateDir}";
  +    in (
         nameValuePair "geth-${gethName}" (mkIf cfg.enable {
         description = "Go Ethereum node (${gethName})";
         wantedBy = [ "multi-user.target" ];
  
positive.code:       serviceConfig = {
          DynamicUser = true;
          Restart = "always";
          StateDirectory = "goethereum/${gethName}/${if (cfg.network == null) then "mainnet" else cfg.network}";
  
          # Hardening measures
          PrivateTmp = "true";
  
negative.code:           default = null;
            description = lib.mdDoc "APIs to enable over WebSocket";
            example = ["net" "eth"];
          };
        };
  
        authrpc = {
          enable = lib.mkEnableOption "Go Ethereum Auth RPC API";
          address = mkOption {
            type = types.str;
            default = "127.0.0.1";
            description = lib.mdDoc "Listen address of Go Ethereum Auth RPC API.";
          };
  
          port = mkOption {
            type = types.port;
            default = 8551;
            description = lib.mdDoc "Port number of Go Ethereum Auth RPC API.";
          };
  
          vhosts = mkOption {
            type = types.nullOr (types.listOf types.str);
            default = ["localhost"];
            description = lib.mdDoc "List of virtual hostnames from which to accept requests.";
            example = ["localhost" "geth.example.org"];
          };
  
          jwtsecret = mkOption {
            type = types.str;
            default = "";
            description = lib.mdDoc "Path to a JWT secret for authenticated RPC endpoint.";
            example = "/var/run/geth/jwtsecret";
          };
        };
  
  