fix: combine duplicate allowedTCPPorts into single list in firewall example#16
Conversation
…xample Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Fixes an issue in the NixOS firewall example in docs/SECURITY.md where duplicate allowedTCPPorts assignments caused the first list to be silently overwritten, resulting in an incorrect/partial configuration.
Changes:
- Combine duplicate
allowedTCPPortsassignments into a single list so both ports are opened as intended.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| allowedTCPPorts = [ 9000 9001 ]; # API port and console port | ||
|
|
||
| # Or use interfaces for more granular control | ||
| interfaces.eth0.allowedTCPPorts = [ 9000 9001 ]; |
There was a problem hiding this comment.
The firewall snippet currently sets allowedTCPPorts globally and then says "Or use interfaces for more granular control" while also setting interfaces.eth0.allowedTCPPorts. This is confusing because the config shown is not an either/or example. Consider splitting this into two separate examples (global ports vs interface-scoped ports) or comment out/remove the global allowedTCPPorts line in the interface-specific example so the docs match the text.
* feat: Issue #9 improvements and documentation reorganization - Remove manual binary stripping and binutils - Clarify sourceProvenance for pre-compiled binaries - Migrate to environment attribute set (nixpkgs best practice) - Replace shell script with %d placeholder - Default to systemd journal logging - Move detailed docs to docs/, remove duplicates - Update all documentation references * fix: combine duplicate allowedTCPPorts into single list in firewall example (#16) * Initial plan * fix: combine duplicate allowedTCPPorts into single list in firewall example Co-authored-by: houseme <4829346+houseme@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: houseme <4829346+houseme@users.noreply.github.com> * fix: address PR #15 review feedback — secrets handling, broken links, optional logDirectory (#17) * Initial plan * fix: address remaining review comments - secrets handling, broken links, optional logDirectory Co-authored-by: houseme <4829346+houseme@users.noreply.github.com> * fix: clarify CHANGELOG deprecated accessKey/secretKey semantics and required file path Co-authored-by: houseme <4829346+houseme@users.noreply.github.com> * fix: remove hardcoded secrets from activation script example; align README with LoadCredential behavior Co-authored-by: houseme <4829346+houseme@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: houseme <4829346+houseme@users.noreply.github.com> * add workflows config * fix: CI — nixpkgs-fmt formatting violations and mkRenamedOptionModule arity (#18) * Initial plan * fix: resolve CI errors — invalid checkout@v6 and mkRenamedOptionModule 3-arg call Co-authored-by: houseme <4829346+houseme@users.noreply.github.com> * fix: apply nixpkgs-fmt to all 3 failing files and restore checkout@v6 Co-authored-by: houseme <4829346+houseme@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: houseme <4829346+houseme@users.noreply.github.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>
The firewall example in
docs/SECURITY.mdhad two separateallowedTCPPortsassignments — in Nix, the second silently overwrites the first, meaning only port 9001 would be opened.Changes
docs/SECURITY.md: Merged the twoallowedTCPPortsassignments into a single list so both ports are correctly declared💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.