mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-02 23:21:02 +01:00
Following https://github.com/jj-vcs/jj/pull/6300, Jujutsu has deprecated support for configuration files in `~/Library/Application Support` for darwin. The XDG-standard configuration location can be used instead, for all platforms.
24 lines
490 B
Nix
24 lines
490 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.programs.jujutsu;
|
|
packageVersion = lib.getVersion cfg.package;
|
|
|
|
# jj v0.29+ deprecated support for "~/Library/Application Support" on Darwin.
|
|
configDir =
|
|
if pkgs.stdenv.isDarwin && !(lib.versionAtLeast packageVersion "0.29.0") then
|
|
"Library/Application Support"
|
|
else
|
|
".config";
|
|
in
|
|
{
|
|
programs.jujutsu.enable = true;
|
|
|
|
nmt.script = ''
|
|
assertPathNotExists 'home-files/${configDir}/jj/config.toml'
|
|
'';
|
|
}
|