Files
home-manager/tests/modules/programs/jujutsu/empty-config.nix
K900 0668fdbc15 treewide: stdenv.is* -> stdenv.hostPlatform.is*
Nixpkgs officialy deprecated the former.
2026-08-13 08:40:58 +02:00

25 lines
503 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.hostPlatform.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'
'';
}