Files
home-manager/tests/modules/programs/cudatext/mutable-empty.nix
Austin Horstman 4e3d5236ae cudatext: add opt-in mutable settings
Preserve interactive settings and keymaps while applying declarations
during activation. Parse existing commented JSON using the packaged
reader and keep the default file ownership.
2026-10-04 20:17:41 -05:00

33 lines
874 B
Nix

{ config, pkgs, ... }:
{
programs.cudatext = {
enable = true;
package = null;
mutableSettings = true;
};
assertions = [
{
assertion = config.programs.cudatext.mutableSettings;
message = "Mutable CudaText settings must remain enabled for an empty configuration.";
}
{
assertion = !(config.home.activation ? cudatextSettings);
message = "Empty CudaText settings must not register mutable settings activation.";
}
{
assertion = !(config.home.activation ? cudatextImmutableSettings);
message = "Empty CudaText settings must not register immutable settings cleanup.";
}
];
nmt.script = ''
assertPathNotExists "home-files/${
if pkgs.stdenv.hostPlatform.isDarwin then
"Library/Application Support/CudaText"
else
".config/cudatext"
}/settings/user.json"
'';
}