Skip to content

Conversation

heywoodlh
Copy link

Description

Use the correct configuration directory when on MacOS for the iamb module

Checklist

  • Change is backwards compatible.

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

  • Code tested through nix-shell --pure tests -A run.all
    or nix build --reference-lock-file flake.lock ./tests#test-all using Flakes.

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

Maintainer CC

@wikiker

@heywoodlh heywoodlh changed the title iamb: using macos configuration directory when on darwin iamb: use macos configuration directory when on darwin Jul 15, 2025
@heywoodlh heywoodlh force-pushed the iamb-macos-settings-support branch from 2d957e0 to 7c6e5d4 Compare July 15, 2025 21:05
@heywoodlh heywoodlh force-pushed the iamb-macos-settings-support branch from 7c6e5d4 to 13ea0d9 Compare July 15, 2025 21:08
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
config =
let
configFile = tomlFormat.generate "iamb-config" cfg.settings;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
configFile = tomlFormat.generate "iamb-config" cfg.settings;
configFile = tomlFormat.generate "iamb-config" cfg.settings;
configDir =
if pkgs.stdenv.isDarwin then
"Library/Application Support"
else
config.xdg.configHome;

Could do this, like we do in other modules, and then simplify the config block with one file generation condition using home.file

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.

2 participants