diff --git a/modules/programs/wallust.nix b/modules/programs/wallust.nix index 8e5f20afb..86a966d46 100644 --- a/modules/programs/wallust.nix +++ b/modules/programs/wallust.nix @@ -42,8 +42,16 @@ in config = mkIf cfg.enable { home.packages = lib.mkIf (cfg.package != null) [ cfg.package ]; - xdg.configFile."wallust/wallust.toml" = mkIf (cfg.settings != { }) { - source = tomlFormat.generate "wallust.toml" cfg.settings; - }; + xdg.configFile."wallust/wallust.toml" = + mkIf (cfg.settings != { } && !pkgs.stdenv.hostPlatform.isDarwin) + { + source = tomlFormat.generate "wallust.toml" cfg.settings; + }; + + home.file."Library/Application Support/wallust/wallust.toml" = + mkIf (cfg.settings != { } && pkgs.stdenv.hostPlatform.isDarwin) + { + source = tomlFormat.generate "wallust.toml" cfg.settings; + }; }; } diff --git a/tests/modules/programs/wallust/wallust.nix b/tests/modules/programs/wallust/wallust.nix index eaf9048af..2ec70153a 100644 --- a/tests/modules/programs/wallust/wallust.nix +++ b/tests/modules/programs/wallust/wallust.nix @@ -1,3 +1,7 @@ +{ + pkgs, + ... +}: { home.enableNixpkgsReleaseCheck = false; programs.wallust = { @@ -9,8 +13,16 @@ }; }; - nmt.script = '' - assertFileExists home-files/.config/wallust/wallust.toml - assertFileContent home-files/.config/wallust/wallust.toml ${./expected.toml} - ''; + nmt.script = + let + path = + if pkgs.stdenv.hostPlatform.isDarwin then + "home-files/Library/Application Support/wallust/wallust.toml" + else + "home-files/.config/wallust/wallust.toml"; + in + '' + assertFileExists '${path}' + assertFileContent '${path}' ${./expected.toml} + ''; }