1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00

jujutsu: store configuration in $XDG_CONFIG_HOME for all platforms (#6994)

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.
This commit is contained in:
Benjamin Tan 2025-05-09 21:27:49 +08:00 committed by GitHub
parent f2b5bf55aa
commit e9bd9568db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 37 additions and 8 deletions

View file

@ -9,9 +9,14 @@ let
cfg = config.programs.jujutsu;
tomlFormat = pkgs.formats.toml { };
packageVersion = lib.getVersion cfg.package;
configDir = if pkgs.stdenv.isDarwin then "Library/Application Support" else config.xdg.configHome;
# 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.xdg.configHome;
in
{
meta.maintainers = [ lib.maintainers.shikanime ];

View file

@ -1,7 +1,19 @@
{ pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
configDir = if pkgs.stdenv.isDarwin then "Library/Application Support" else ".config";
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;

View file

@ -1,7 +1,19 @@
{ pkgs, config, ... }:
{
config,
lib,
pkgs,
...
}:
let
configDir = if pkgs.stdenv.isDarwin then "Library/Application Support" else ".config";
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 = {