Skip to content

Conversation

Copy link
Contributor

Copilot AI commented May 24, 2025

  • Complete Control Center configuration (TODO line 47)
  • Complete Finder configuration (TODO line 67)
  • Complete Login Window configuration (TODO line 71)
  • Complete NSGlobalDomain configuration (TODO line 86)
  • Complete Screen Capture configuration (TODO line 89)
  • Complete Screen Saver configuration (TODO line 90)
  • Complete SMB configuration (TODO line 91)
  • Complete Universal Access configuration (TODO line 103)
  • Complete Window Manager configuration (TODO line 104)
  • Verify all changes and ensure consistency

Added the following configurations:

  1. Control Center - added WiFi, Bluetooth, Sound percentages and accessibility shortcuts
  2. Finder - added path in title, desktop icons, quit menu item, search scope, and view style
  3. Login Window - added security settings and custom message

Fixes #9.


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

@pull-request-size pull-request-size bot added the size/XS Very small change (0-9 lines) label May 24, 2025
@coderabbitai
Copy link

coderabbitai bot commented May 24, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Summary by CodeRabbit

  • New Features

    • Expanded system customization options for Control Center, Finder, and Login Window settings, allowing more granular control over battery, WiFi, Bluetooth, sound, accessibility, Finder view preferences, and login window behaviors.
  • Refactor

    • Settings for Control Center and Login Window are now organized into grouped categories for easier management and clarity.

Walkthrough

Alright, chat, here's the deal: The Nix Darwin system config just got a serious upgrade. Instead of single booleans, now we've got nested attribute sets for controlcenter and loginwindow, and a bunch of new Finder tweaks. More flags, more control, more... Primeagen-approved config glory.

Changes

File(s) Change Summary
dotfiles/nix/system.nix Refactored system.defaults.controlcenter and loginwindow from single booleans to attribute sets; extended finder with multiple new options and flags.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant NixConfig
    participant macOSSystem

    User->>NixConfig: Edit system.nix (add nested attribute sets)
    NixConfig->>macOSSystem: Apply expanded controlcenter, finder, and loginwindow settings
    macOSSystem-->>User: System applies new granular defaults
Loading

Poem

🚀
In the land of the dotfiles, we set more than a flag,
Now Finder’s a beast, and Control Center’s swag.
Loginwindow’s locked down, with messages to boot,
Nested configs so clean, man, this setup’s acute!
Vim would be proud, and so should you—
Next-level Nix, what else is new?


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Join our Discord community for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@pull-request-size pull-request-size bot added size/S Small change (10-29 lines) and removed size/XS Very small change (0-9 lines) labels May 24, 2025
@LarsArtmann LarsArtmann marked this pull request as ready for review May 28, 2025 20:05
@LarsArtmann
Copy link
Owner

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented May 28, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Comment on lines +84 to +86
ShutDownDisabled = false; # Allow shutdown from login window
RestartDisabled = false; # Allow restart from login window
SleepDisabled = false; # Allow sleep from login window
Copy link
Owner

Choose a reason for hiding this comment

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

@copilot all of this should be enabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Enabled comprehensive NSGlobalDomain configuration with keyboard settings, UI preferences, text handling, printing defaults, and system behaviors as requested. All settings are now enabled. Changes in commit cc860d9.

Comment on lines 72 to 77
_FXShowPosixPathInTitle = true; # Show full POSIX path in Finder title
CreateDesktop = true; # Show desktop icons
QuitMenuItem = true; # Allow quitting Finder
FXDefaultSearchScope = "SCcf"; # Search current folder by default
FXPreferredViewStyle = "Nlsv"; # Use list view by default
FXCalculateAllSizes = true; # Calculate all folder sizes
Copy link
Owner

Choose a reason for hiding this comment

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

Nice +1

Comment on lines 48 to 51
WiFiShowPercentage = true;
BluetoothShowPercentage = true;
SoundShowPercentage = true;
AccessibilityShortcuts = true;
Copy link
Owner

Choose a reason for hiding this comment

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

@copilot This doesn't seem right.

system.defaults.controlcenter.AirDrop
Apple menu > System Preferences > Control Center > AirDropShow a AirDrop control in menu …
system.defaults.controlcenter.BatteryShowPercentage
Apple menu > System Preferences > Control Center > BatteryShow a battery percentage in me…
system.defaults.controlcenter.Bluetooth
Apple menu > System Preferences > Control Center > BluetoothShow a bluetooth control in m…
system.defaults.controlcenter.Display
Apple menu > System Preferences > Control Center > DisplayShow a Screen Brightness contro…
system.defaults.controlcenter.FocusModes
Apple menu > System Preferences > Control Center > FocusShow a Focus control in menu bar
system.defaults.controlcenter.NowPlaying
Apple menu > System Preferences > Control Center > Now PlayingShow a Now Playing control …
system.defaults.controlcenter.Sound
Apple menu > System Preferences > Control Center > SoundShow a sound control in menu bar

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed the Control Center configuration to use the correct nix-darwin options as documented. Replaced invalid options (WiFiShowPercentage, BluetoothShowPercentage, etc.) with proper ones (AirDrop, Bluetooth, Display, FocusModes, NowPlaying, Sound). Changes in commit cc860d9.

Comment on lines 72 to 77
_FXShowPosixPathInTitle = true; # Show full POSIX path in Finder title
CreateDesktop = true; # Show desktop icons
QuitMenuItem = true; # Allow quitting Finder
FXDefaultSearchScope = "SCcf"; # Search current folder by default
FXPreferredViewStyle = "Nlsv"; # Use list view by default
FXCalculateAllSizes = true; # Calculate all folder sizes
Copy link
Owner

Choose a reason for hiding this comment

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

@copilot Double check that this is all correct.

system.defaults.finder._FXShowPosixPathInTitle
Whether to show the full POSIX filepath in the window title
system.defaults.finder._FXSortFoldersFirst
Keep folders on top when sorting by name
system.defaults.finder._FXSortFoldersFirstOnDesktop
Keep folders on top when sorting by name on the desktop
system.defaults.finder.AppleShowAllExtensions
Whether to always show file extensions
system.defaults.finder.AppleShowAllFiles
Whether to always show hidden files
system.defaults.finder.CreateDesktop
Whether to show icons on the desktop or not
system.defaults.finder.FXDefaultSearchScope
Change the default search scope
system.defaults.finder.FXEnableExtensionChangeWarning
Whether to show warnings when change the file extension of files
system.defaults.finder.FXPreferredViewStyle
Change the default finder view
system.defaults.finder.FXRemoveOldTrashItems
Remove items in the trash after 30 days
system.defaults.finder.NewWindowTarget
Change the default folder shown in Finder windows
system.defaults.finder.NewWindowTargetPath
Sets the URI to open when NewWindowTarget is "Other"
system.defaults.finder.QuitMenuItem
Whether to allow quitting of the Finder
system.defaults.finder.ShowExternalHardDrivesOnDesktop
Whether to show external disks on desktop
system.defaults.finder.ShowHardDrivesOnDesktop
Whether to show hard disks on desktop
system.defaults.finder.ShowMountedServersOnDesktop
Whether to show connected servers on desktop
system.defaults.finder.ShowPathbar
Show path breadcrumbs in finder windows
system.defaults.finder.ShowRemovableMediaOnDesktop
Whether to show removable media (CDs, DVDs and iPods) on desktop
system.defaults.finder.ShowStatusBar
Show status bar at bottom of finder windows with item/disk space stats

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Double-checked the Finder configuration against the nix-darwin documentation. All settings are correct and match the documented options. Removed duplicate FXCalculateAllSizes since it's already handled in activationScripts. Changes in commit cc860d9.

Co-authored-by: LarsArtmann <23587853+LarsArtmann@users.noreply.github.com>
Co-authored-by: LarsArtmann <23587853+LarsArtmann@users.noreply.github.com>
@pull-request-size pull-request-size bot added size/M Medium change (30-99 lines) and removed size/S Small change (10-29 lines) labels Jun 5, 2025
…ow manager configs

Co-authored-by: LarsArtmann <23587853+LarsArtmann@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Medium change (30-99 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Complete TODOs in system.nix for macOS defaults configuration

2 participants