Skip to content

Conversation

@damidoug
Copy link
Contributor

Description

This PR introduces a significant refactor of the aerospace configuration system to make it simpler and more powerful.

The most notable change is renaming userSettings to settings. This branch also introduces auto-reloading of the config file and adds assertions to guide users toward an updated configuration structure.

Key Changes:

Rename: userSettings has been renamed to settings for simplicity (#6895).

Feature: The config file will now auto-reload on file changes (#7086).

Refactor: Removed extraConfig and consolidated its use into the new settings key (#8010).

Defaults: Added default settings to streamline new user setup.

Validation: Added an assertion to ensure users migrate from deprecated keys (start-at-login, after-login-command) to the correct modern keys (launchd.enable, after-startup-command).

Docs: Added more examples for the new settings (#8010).

Tests: Added more tests and fixed expected values to match the new settings structure.

Checklist

  • Change is backwards compatible.

  • Code formatted with nix fmt or
    nix-shell -p treefmt nixfmt deadnix keep-sorted --run treefmt.

  • Code tested through nix run .#tests -- test-all or
    nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.
    • Generate a news entry. See News
    • Basic tests added. See Tests
  • If this PR adds an exciting new feature or contains a breaking change.

    • Generate a news entry. See News

@damidoug
Copy link
Contributor Author

@phucisstupid @leon-erd

@leon-erd
Copy link
Contributor

Why did you remove extraConfig? How are you supposed to add multiline strings to the toml now?
And aren't we just back to only using the toml generator now for everything? Just the way it was before introducing extraConfig?
As stated in this comment #8010 (comment) the toml generator didn't work for me for arrays of table in the way aerospace expects it for things like on-window-detected. Have you tested on-window-detected with your changes?

@damidoug
Copy link
Contributor Author

damidoug commented Nov 15, 2025

@leon-erd I've fixed it. It's not necessary to use extraConfig you can check the tests. Also, the way on-window-detected is written in the TOML file is correct and works with no issues.

@leon-erd
Copy link
Contributor

Yes I have just checked it :) It does work! I'm fine with merging

@khaneliman khaneliman merged commit c220f24 into nix-community:master Nov 28, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants