mirror of
https://github.com/nix-community/home-manager.git
synced 2026-12-06 04:40:17 +00:00
Preserve interactive settings and keymaps while applying declarations during activation. Parse existing commented JSON using the packaged reader and keep the default file ownership.
34 lines
901 B
Nix
34 lines
901 B
Nix
{ config, pkgs, ... }:
|
|
{
|
|
programs.cudatext = {
|
|
enable = false;
|
|
package = null;
|
|
mutableSettings = true;
|
|
userSettings.numbers_style = 2;
|
|
};
|
|
|
|
assertions = [
|
|
{
|
|
assertion = config.programs.cudatext.mutableSettings;
|
|
message = "Mutable CudaText settings must remain enabled while the module is disabled.";
|
|
}
|
|
{
|
|
assertion = !(config.home.activation ? cudatextSettings);
|
|
message = "Disabled CudaText must not register mutable settings activation.";
|
|
}
|
|
{
|
|
assertion = !(config.home.activation ? cudatextImmutableSettings);
|
|
message = "Disabled CudaText 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"
|
|
'';
|
|
}
|