Skip to content

Simplify neverssl FAQ entry - #328

Merged
shunkakinoki merged 1 commit into
mainfrom
codex/add-auto-renew-neverssl-on-private-wifi
Nov 9, 2025
Merged

Simplify neverssl FAQ entry#328
shunkakinoki merged 1 commit into
mainfrom
codex/add-auto-renew-neverssl-on-private-wifi

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Nov 9, 2025

Copy link
Copy Markdown
Owner

Summary

  • condense the neverssl captive portal FAQ entry to focus on the essential automation options

Testing

  • make format

Codex Task


Summary by cubic

Simplified the neverssl captive portal FAQ and added a Home Manager service to auto-renew sessions with a 3-second systemd user timer.

  • New Features
    • Added home-manager/services/neverssl-keepalive: a curl-based oneshot service with a user timer (OnBootSec=3s, OnUnitActiveSec=3s) to ping neverssl.com.
    • Registered the service in home-manager/services/default.nix.

Written for commit 95e3707. Summary will update automatically on new commits.

Copilot AI review requested due to automatic review settings November 9, 2025 02:15
@shunkakinoki shunkakinoki added the codex Label for Codex pull requests. label Nov 9, 2025 — with ChatGPT Codex Connector
@coderabbitai

coderabbitai Bot commented Nov 9, 2025

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • Documentation

    • Added FAQ section on maintaining captive portal sessions with automatic renewal examples across multiple systems.
  • New Features

    • Added neverssl keepalive service for automatic session management on private wifi networks.

Walkthrough

Adds documentation and a new Home Manager service module for keeping captive portal sessions alive. The module provides a systemd user service and timer that periodically pings neverssl.com to prevent session expiration on private networks.

Changes

Cohort / File(s) Change Summary
Documentation
FAQ.md
Adds FAQ subsection detailing methods to auto-renew neverssl on private wifi, including Systemd, Cron/launchd examples, and NixOS/Home Manager module setup.
Service Module Registration
home-manager/services/default.nix
Registers new neversslKeepalive service module by importing ./neverssl-keepalive and adding it to the services list.
Service Implementation
home-manager/services/neverssl-keepalive/default.nix
Implements neverssl keepalive module with systemd user service and timer. Service executes a curl-based script to ping neverssl.com; timer triggers every 3 seconds after boot.

Sequence Diagram

sequenceDiagram
    participant Timer as systemd Timer<br/>(neverssl-keepalive)
    participant Service as systemd Service<br/>(neverssl-keepalive)
    participant Script as Shell Script<br/>(neverssl-keepalive)
    participant Remote as neverssl.com

    Timer->>Timer: OnBootSec 3s
    Timer->>Service: Trigger neverssl-keepalive.service
    Service->>Script: ExecStart
    Script->>Remote: curl http://neverssl.com
    alt Request succeeds
        Remote-->>Script: HTTP response
        Script-->>Service: Exit 0
    else Request fails
        Script-->>Service: Exit 0 (intentional)
    end
    Service-->>Timer: Service complete
    Timer->>Timer: OnUnitActiveSec 3s (reschedule)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • FAQ section: Straightforward documentation addition with examples.
  • Service module: New Nix module follows standard Home Manager patterns; verify systemd configuration (timer intervals, service type) and curl dependency.

Poem

🐰 A timer hops each three brief seconds,
Whispering to captive portals with curl,
"Neverssl keeps the connection unfurled!"
No session expiry our keepalive reckons,
On private wifi, our service beckons. 🌐

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'Simplify neverssl FAQ entry' is misleading; the PR actually adds a new service module and home-manager integration, not just FAQ simplification. Update title to reflect both changes: 'Add neverssl-keepalive service and simplify FAQ' or similar to accurately represent the full scope of changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description accurately relates to the changeset, covering both the FAQ simplification and the new neverssl-keepalive service with systemd integration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/add-auto-renew-neverssl-on-private-wifi

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @shunkakinoki, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new feature to help users maintain active captive portal sessions by periodically pinging neverssl.com. It provides detailed instructions in the FAQ.md for various operating systems and includes a dedicated NixOS/Home Manager module for streamlined setup, ensuring continuous network access without manual intervention.

Highlights

  • New FAQ Entry: Added a comprehensive FAQ entry detailing methods to automatically renew neverssl.com captive portal sessions using Systemd, Cron/launchd, and a new NixOS/Home Manager module.
  • NixOS/Home Manager Module: Introduced a new neverssl-keepalive module for NixOS/Home Manager, providing a systemd user service and timer to periodically ping neverssl.com.
  • Module Integration: Integrated the new neverssl-keepalive module into the home-manager/services/default.nix file, making it available for use within Home Manager configurations.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@mesa-dot-dev

mesa-dot-dev Bot commented Nov 9, 2025

Copy link
Copy Markdown

Mesa Description

TL;DR

Simplified the neverssl FAQ entry by condensing it to focus on essential automation options.

What changed?

The neverssl captive portal FAQ entry was condensed to highlight essential automation options. (File summaries were not provided for detailed changes.)

Description generated by Mesa. Update settings

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a helpful feature to keep captive portal sessions alive using neverssl.com, including a new FAQ entry and a home-manager service. The implementation is solid. I've offered a couple of suggestions to enhance the clarity of the documentation and simplify the keepalive script for better readability and consistency.

Comment thread FAQ.md

For more details, see [nix-darwin issue #789](https://github.com/LnL7/nix-darwin/issues/789).

## Auto renew neverssl on private wifi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The title "Auto renew neverssl on private wifi" could be misleading. Captive portals are most common on public Wi-Fi networks (e.g., airports, hotels), not private ones. Using a more general title would better reflect the feature's purpose.

Suggested change
## Auto renew neverssl on private wifi
## Keep captive portal sessions alive using neverssl

Comment on lines +7 to +10
set -euo pipefail
if ! curl -fsS --max-time 10 http://neverssl.com > /dev/null 2>&1; then
exit 0
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The shell script logic can be simplified. The current if statement to handle the curl exit code is a bit verbose. You can achieve the same result more concisely by using || true, which also aligns with the command suggested in FAQ.md for cron.

      set -uo pipefail
      curl -fsS --max-time 10 http://neverssl.com > /dev/null 2>&1 || true

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a neverssl-keepalive service to automatically maintain captive portal sessions by periodically sending HTTP requests to neverssl.com. The implementation uses systemd user services and timers for Linux environments.

  • Implements a systemd user service that pings neverssl.com every 3 seconds
  • Integrates the new service into the home-manager services module
  • Adds FAQ documentation with setup instructions for various platforms

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
home-manager/services/neverssl-keepalive/default.nix Defines systemd service and timer for captive portal keepalive
home-manager/services/default.nix Imports and exports the new neverssl-keepalive service
FAQ.md Documents usage and configuration for the neverssl keepalive feature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +32 to +33
OnBootSec = "3s";
OnUnitActiveSec = "3s";

Copilot AI Nov 9, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 3-second interval is extremely aggressive and will generate ~28,800 HTTP requests per day. This could unnecessarily consume network bandwidth and battery on mobile devices. Consider increasing the interval to at least 30-60 seconds, which is typically sufficient for captive portal keepalive while being much more resource-friendly (reducing requests to ~2,880 per day at 30s intervals).

Suggested change
OnBootSec = "3s";
OnUnitActiveSec = "3s";
OnBootSec = "30s";
OnUnitActiveSec = "30s";

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +3
{ pkgs }:
let
keepaliveScript = pkgs.writeShellApplication {

Copilot AI Nov 9, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The service uses systemd which is Linux-specific, but unlike other services in this codebase (code-syncer, ollama), there's no platform check using pkgs.lib.mkIf pkgs.stdenv.isLinux. This will cause issues on macOS systems. Consider wrapping the entire configuration with a platform check or updating the return value structure to handle both platforms.

Copilot uses AI. Check for mistakes.
OnBootSec = "3s";
OnUnitActiveSec = "3s";
AccuracySec = "1s";
Unit = "neverssl-keepalive.service";

Copilot AI Nov 9, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Timer.Unit field is redundant in systemd timers. By default, a timer automatically activates a service with the same name (minus the .timer suffix). This line can be safely removed as neverssl-keepalive.timer will automatically trigger neverssl-keepalive.service.

Suggested change
Unit = "neverssl-keepalive.service";

Copilot uses AI. Check for mistakes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
home-manager/services/neverssl-keepalive/default.nix (2)

3-12: Consider adding a comment explaining the failure handling.

The exit 0 on curl failure is intentional (preventing systemd from marking the service as failed when the network is unavailable), but this logic may confuse future maintainers.

Apply this diff to add clarity:

     text = ''
       set -euo pipefail
+      # Exit successfully even on curl failure to avoid systemd errors during network issues
       if ! curl -fsS --max-time 10 http://neverssl.com > /dev/null 2>&1; then
         exit 0
       fi

32-33: Consider a less aggressive interval.

A 3-second interval generates ~28,800 requests per day. Most captive portals maintain sessions for minutes, so 30-60 second intervals would typically suffice while reducing network traffic and power consumption.

If you want to keep the 3-second default, consider this diff:

     Timer = {
-      OnBootSec = "3s";
-      OnUnitActiveSec = "3s";
+      OnBootSec = "30s";
+      OnUnitActiveSec = "30s";
       AccuracySec = "1s";
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between af4d988 and 95e3707.

📒 Files selected for processing (3)
  • FAQ.md (1 hunks)
  • home-manager/services/default.nix (1 hunks)
  • home-manager/services/neverssl-keepalive/default.nix (1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
**/*.nix

📄 CodeRabbit inference engine (CLAUDE.md)

Format all Nix files with nixfmt

**/*.nix: Nix: Use 2 spaces for indentation
Nix: Keep line length under 100 characters
Nix: Sort attribute sets alphabetically
Nix: Use consistent spacing around operators
Nix: Format lists and sets consistently

Follow the Nix expression language style guide

Files:

  • home-manager/services/default.nix
  • home-manager/services/neverssl-keepalive/default.nix
**/default.nix

📄 CodeRabbit inference engine (CLAUDE.md)

Use default.nix files for module exports

Files:

  • home-manager/services/default.nix
  • home-manager/services/neverssl-keepalive/default.nix
home-manager/**

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Keep home-manager configurations under home-manager/

Files:

  • home-manager/services/default.nix
  • home-manager/services/neverssl-keepalive/default.nix
home-manager/**/*.nix

📄 CodeRabbit inference engine (.cursor/rules/home-manager.mdc)

Use proper indentation and formatting in Nix files

Files:

  • home-manager/services/default.nix
  • home-manager/services/neverssl-keepalive/default.nix
home-manager/services/**/*.nix

📄 CodeRabbit inference engine (.cursor/rules/nix.mdc)

home-manager/services/**/*.nix: Service configurations in home-manager/services should follow systemd service conventions
Service configurations should include proper service dependencies
Service configurations should provide clear documentation for service parameters

Files:

  • home-manager/services/default.nix
  • home-manager/services/neverssl-keepalive/default.nix
home-manager/services/*/default.nix

📄 CodeRabbit inference engine (.cursor/rules/home-manager.mdc)

home-manager/services/*/default.nix: Service configurations must be located in home-manager/services// with configuration in default.nix
Service configurations should include proper service definitions
Service configurations must handle dependencies correctly
Service configurations must document service parameters

Files:

  • home-manager/services/neverssl-keepalive/default.nix
🧠 Learnings (7)
📚 Learning: 2025-09-28T16:27:24.275Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/home-manager.mdc:0-0
Timestamp: 2025-09-28T16:27:24.275Z
Learning: Applies to home-manager/services/*/default.nix : Service configurations should include proper service definitions

Applied to files:

  • home-manager/services/default.nix
  • home-manager/services/neverssl-keepalive/default.nix
📚 Learning: 2025-09-28T16:27:59.822Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/nix.mdc:0-0
Timestamp: 2025-09-28T16:27:59.822Z
Learning: Applies to home-manager/services/**/*.nix : Service configurations should include proper service dependencies

Applied to files:

  • home-manager/services/default.nix
  • home-manager/services/neverssl-keepalive/default.nix
📚 Learning: 2025-09-28T16:27:24.275Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/home-manager.mdc:0-0
Timestamp: 2025-09-28T16:27:24.275Z
Learning: Applies to home-manager/services/*/default.nix : Service configurations must handle dependencies correctly

Applied to files:

  • home-manager/services/default.nix
  • home-manager/services/neverssl-keepalive/default.nix
📚 Learning: 2025-09-28T16:27:24.275Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/home-manager.mdc:0-0
Timestamp: 2025-09-28T16:27:24.275Z
Learning: Applies to home-manager/services/*/default.nix : Service configurations must document service parameters

Applied to files:

  • home-manager/services/default.nix
  • home-manager/services/neverssl-keepalive/default.nix
📚 Learning: 2025-09-28T16:27:59.822Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/nix.mdc:0-0
Timestamp: 2025-09-28T16:27:59.822Z
Learning: Applies to home-manager/services/**/*.nix : Service configurations in home-manager/services should follow systemd service conventions

Applied to files:

  • home-manager/services/default.nix
  • home-manager/services/neverssl-keepalive/default.nix
📚 Learning: 2025-09-28T16:27:24.275Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/home-manager.mdc:0-0
Timestamp: 2025-09-28T16:27:24.275Z
Learning: Applies to home-manager/services/*/default.nix : Service configurations must be located in home-manager/services/<name>/ with configuration in default.nix

Applied to files:

  • home-manager/services/default.nix
📚 Learning: 2025-09-28T16:27:59.822Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/nix.mdc:0-0
Timestamp: 2025-09-28T16:27:59.822Z
Learning: Applies to home-manager/services/**/*.nix : Service configurations should provide clear documentation for service parameters

Applied to files:

  • home-manager/services/default.nix
  • home-manager/services/neverssl-keepalive/default.nix
🪛 LanguageTool
FAQ.md

[grammar] ~16-~16: Use a hyphen to join words.
Context: ...om/nix-darwin/nix-darwin/issues/789). ## Auto renew neverssl on private wifi Send a l...

(QB_NEW_EN_HYPHEN)


[grammar] ~16-~16: Ensure spelling is correct
Context: .../nix-darwin/issues/789). ## Auto renew neverssl on private wifi Send a lightweight HTT...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Mesa
  • GitHub Check: nix-nixos
  • GitHub Check: nix-linux
  • GitHub Check: nix-darwin
  • GitHub Check: docker-build-push (linux/arm64, arm64, ubuntu-24.04-arm)
  • GitHub Check: docker-build-push (linux/amd64, amd64, ubuntu-latest)
  • GitHub Check: e2e-run (MacOS, macos-latest)
  • GitHub Check: e2e-run (NixOS, ubuntu-latest)
  • GitHub Check: e2e-run (Ubuntu, ubuntu-latest)
🔇 Additional comments (3)
FAQ.md (1)

16-26: LGTM! Clear and concise FAQ entry.

The new FAQ section provides practical guidance for keeping captive portal sessions alive across multiple platforms. The static analysis warnings about "neverssl" are false positives—it's the legitimate domain name neverssl.com used for captive portal detection.

home-manager/services/default.nix (1)

5-5: LGTM! Follows existing patterns.

The new service module is properly integrated following the established pattern, with correct alphabetical ordering and consistent formatting.

Also applies to: 11-11

home-manager/services/neverssl-keepalive/default.nix (1)

15-25: LGTM! Proper systemd service definition.

The service follows systemd conventions with appropriate network dependencies and oneshot type for timer-triggered execution.

Comment on lines +1 to +41
{ pkgs }:
let
keepaliveScript = pkgs.writeShellApplication {
name = "neverssl-keepalive";
runtimeInputs = [ pkgs.curl ];
text = ''
set -euo pipefail
if ! curl -fsS --max-time 10 http://neverssl.com > /dev/null 2>&1; then
exit 0
fi
'';
};
in
{
systemd.user.services.neverssl-keepalive = {
Unit = {
Description = "Keep captive portal alive via neverssl.com";
Wants = [ "network-online.target" ];
After = [ "network-online.target" ];
};
Service = {
Type = "oneshot";
ExecStart = "${keepaliveScript}/bin/neverssl-keepalive";
};
};

systemd.user.timers.neverssl-keepalive = {
Unit = {
Description = "Timer for neverssl captive portal keepalive";
};
Timer = {
OnBootSec = "3s";
OnUnitActiveSec = "3s";
AccuracySec = "1s";
Unit = "neverssl-keepalive.service";
};
Install = {
WantedBy = [ "timers.target" ];
};
};
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Expose configuration options for the service.

The module hardcodes the interval (3s) and URL without exposing any configuration parameters. This violates the coding guidelines requirement that service configurations must document service parameters.

Consider restructuring the module to expose options:

{ config, lib, pkgs, ... }:
with lib;
let
  cfg = config.services.neverssl-keepalive;
  
  keepaliveScript = pkgs.writeShellApplication {
    name = "neverssl-keepalive";
    runtimeInputs = [ pkgs.curl ];
    text = ''
      set -euo pipefail
      if ! curl -fsS --max-time 10 ${cfg.url} > /dev/null 2>&1; then
        exit 0
      fi
    '';
  };
in
{
  options.services.neverssl-keepalive = {
    enable = mkEnableOption "neverssl captive portal keepalive";
    
    interval = mkOption {
      type = types.str;
      default = "30s";
      description = "Interval between keepalive requests";
    };
    
    url = mkOption {
      type = types.str;
      default = "http://neverssl.com";
      description = "URL to request for keepalive";
    };
  };

  config = mkIf cfg.enable {
    systemd.user.services.neverssl-keepalive = {
      Unit = {
        Description = "Keep captive portal alive via neverssl.com";
        Wants = [ "network-online.target" ];
        After = [ "network-online.target" ];
      };
      Service = {
        Type = "oneshot";
        ExecStart = "${keepaliveScript}/bin/neverssl-keepalive";
      };
    };

    systemd.user.timers.neverssl-keepalive = {
      Unit = {
        Description = "Timer for neverssl captive portal keepalive";
      };
      Timer = {
        OnBootSec = cfg.interval;
        OnUnitActiveSec = cfg.interval;
        AccuracySec = "1s";
        Unit = "neverssl-keepalive.service";
      };
      Install = {
        WantedBy = [ "timers.target" ];
      };
    };
  };
}

This would require updating home-manager/services/default.nix to pass config and lib parameters.

Based on coding guidelines.

@mesa-dot-dev mesa-dot-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performed full review of af4d988...95e3707

Analysis

  1. Platform Incompatibility: The service lacks platform guards for Linux-only functionality (using systemd.user.*), which will break on macOS/Darwin systems. Other services in this repo use proper platform guards.

  2. Excessive Request Frequency: The 3-second timer interval is extremely aggressive, generating ~28,800 requests per day. This creates unnecessary network load when typical captive portals have timeouts of 5-30 minutes.

  3. No Opt-in Mechanism: The service is automatically enabled for all Linux users with no configuration options. For a use-case specific service like this, an opt-in approach would be more appropriate.

  4. Inverted Error Handling Logic: The script exits with success (0) when curl fails, making failures appear as successes in logs and complicating debugging.

  5. Missing Network Robustness: There's no handling for network disconnections, retry logic, or conditions to only run on WiFi networks despite the stated purpose being for "private WiFi".

Tip

Help

Slash Commands:

  • /review - Request a full code review
  • /review latest - Review only changes since the last review
  • /describe - Generate PR description. This will update the PR body or issue comment depending on your configuration
  • /help - Get help with Mesa commands and configuration options

3 files reviewed | 3 comments | Edit Agent SettingsRead Docs

@@ -0,0 +1,41 @@
{ pkgs }:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High

Missing platform guard. This service uses systemd.user.* which is Linux-only, but there's no lib.mkIf pkgs.stdenv.isLinux wrapper. This will break the configuration on macOS/Darwin systems. Other platform-specific services in this repo (ollama, code-syncer) use this pattern. Consider:

{ pkgs }:
let
  inherit (pkgs) lib;
in
lib.mkIf pkgs.stdenv.isLinux {
  # ... rest of service definition
}

Agent: 🏛 Architecture • Fix in Cursor

runtimeInputs = [ pkgs.curl ];
text = ''
set -euo pipefail
if ! curl -fsS --max-time 10 http://neverssl.com > /dev/null 2>&1; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium

The error handling logic appears inverted. With set -euo pipefail, the script will exit on the curl success path (when the if ! condition is false). The explicit exit 0 in the failure branch makes it the only successful path, which means systemd cannot track actual failures. Consider either:

  1. Remove the negation and handle properly: curl ... || exit 0
  2. Or let curl's exit code propagate and use systemd's Restart=on-failure with RestartSec=30s to handle transient network issues

Agent: 🏛 Architecture • Fix in Cursor

Description = "Timer for neverssl captive portal keepalive";
};
Timer = {
OnBootSec = "3s";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium

A 3-second interval is extremely aggressive for a captive portal keepalive, generating ~28,800 requests per day. This creates unnecessary load on neverssl.com infrastructure, wastes network bandwidth and battery, and is much shorter than typical captive portal timeouts (5-30 minutes). Consider using a 5-10 minute interval instead:

OnBootSec = "5min";
OnUnitActiveSec = "5min";

Or make it configurable via a module option if users have different timeout needs.

Agent: 🏛 Architecture • Fix in Cursor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

@shunkakinoki
shunkakinoki merged commit dec4863 into main Nov 9, 2025
30 checks passed
@shunkakinoki
shunkakinoki deleted the codex/add-auto-renew-neverssl-on-private-wifi branch November 9, 2025 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex Label for Codex pull requests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants