Skip to content

fix: CI — nixpkgs-fmt formatting violations and mkRenamedOptionModule arity#18

Merged
houseme merged 3 commits intofeature/improve-security-1from
copilot/sub-pr-15
Mar 3, 2026
Merged

fix: CI — nixpkgs-fmt formatting violations and mkRenamedOptionModule arity#18
houseme merged 3 commits intofeature/improve-security-1from
copilot/sub-pr-15

Conversation

Copy link
Contributor

Copilot AI commented Mar 3, 2026

Three issues prevented CI from running successfully after the workflow was introduced.

Changes

  • nixos/rustfs.nixlib.mkRenamedOptionModule accepts exactly 2 arguments (from: [String]) → (to: [String]) → Module; the spurious 3rd string argument would cause nix flake check to fail at module evaluation time
  • examples/flake.nix — Remove trailing whitespace on blank line (nixpkgs-fmt compliance)
  • examples/nixos-configuration.nix — Remove trailing whitespace on blank lines (nixpkgs-fmt compliance)
  • nixos/rustfs.nix — Reformat to nixpkgs-fmt canonical style: function argument list style, if-then-else indentation, and ++ chain indentation
# Before — fails nix flake check (module called with string, not attrset)
(lib.mkRenamedOptionModule
  [ "services" "rustfs" "accessKey" ]
  [ "services" "rustfs" "accessKeyFile" ]
  "World readable secrets is insecure…"   # ← invalid 3rd arg
)

# After
(lib.mkRenamedOptionModule
  [ "services" "rustfs" "accessKey" ]
  [ "services" "rustfs" "accessKeyFile" ]
)
# Before — non-canonical if-then-else alignment style
volumesStr = if builtins.isList cfg.volumes
             then lib.concatStringsSep "," cfg.volumes
             else cfg.volumes;

# After — nixpkgs-fmt canonical style
volumesStr =
  if builtins.isList cfg.volumes
  then lib.concatStringsSep "," cfg.volumes
  else cfg.volumes;

💡 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.

…e 3-arg call

Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor Issue #9 improvements and documentation reorganization fix: CI — invalid checkout action version and mkRenamedOptionModule arity Mar 3, 2026
@houseme
Copy link
Collaborator

houseme commented Mar 3, 2026

@copilot 'actions/checkout@v6' is the stable version

Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 3, 2026

@copilot 'actions/checkout@v6' is the stable version

Restored to actions/checkout@v6 in e587a61. The actual CI failure was the nixpkgs-fmt formatting check — 3 Nix files had formatting issues (trailing whitespace and non-canonical if-then-else alignment). Fixed by running nixpkgs-fmt on all three files.

Copilot AI changed the title fix: CI — invalid checkout action version and mkRenamedOptionModule arity fix: CI — nixpkgs-fmt formatting violations and mkRenamedOptionModule arity Mar 3, 2026
@houseme houseme marked this pull request as ready for review March 3, 2026 06:38
Copilot AI review requested due to automatic review settings March 3, 2026 06:38
@houseme houseme merged commit 01591fa into feature/improve-security-1 Mar 3, 2026
4 checks passed
@houseme houseme deleted the copilot/sub-pr-15 branch March 3, 2026 06:39
Copy link
Contributor

Copilot AI left a comment

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 fixes CI failures introduced by the new workflow by correcting a NixOS module evaluation error and aligning example/config files with nixpkgs-fmt formatting requirements.

Changes:

  • Fix lib.mkRenamedOptionModule usage in the RustFS NixOS module by removing an invalid third argument that breaks nix flake check during module evaluation.
  • Apply nixpkgs-fmt-compatible formatting updates in nixos/rustfs.nix (argument list and expression indentation).
  • Remove trailing whitespace on blank lines in example Nix files to satisfy nixpkgs-fmt --check.

Reviewed changes

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

File Description
nixos/rustfs.nix Fixes module evaluation by correcting mkRenamedOptionModule arity and applies canonical nixpkgs-fmt formatting.
examples/nixos-configuration.nix Removes trailing whitespace on blank lines to satisfy formatter checks.
examples/flake.nix Removes trailing whitespace on blank lines to satisfy formatter checks.

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

houseme added a commit that referenced this pull request Mar 3, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants