mirror of
https://github.com/nix-community/home-manager.git
synced 2026-12-06 04:40:17 +00:00
Keep the application configuration writable while applying declared settings. Preserve undeclared state and use ordinary collision handling when returning to linked YAML configuration.
25 lines
555 B
Nix
25 lines
555 B
Nix
{
|
|
config,
|
|
...
|
|
}:
|
|
{
|
|
programs.andcli = {
|
|
enable = true;
|
|
mutableSettings = false;
|
|
package = null;
|
|
};
|
|
xdg.configHome = "${config.home.homeDirectory}/custom-config";
|
|
|
|
assertions = [
|
|
{
|
|
assertion = !(config.home.activation ? andcliMutableSettings);
|
|
message = "andcli settings-immutable-empty must not create mutable activation.";
|
|
}
|
|
];
|
|
|
|
nmt.script = ''
|
|
assertPathNotExists "home-files/custom-config/andcli/config.yaml"
|
|
assertPathNotExists "home-files/Library/Application Support/andcli/config.yaml"
|
|
'';
|
|
}
|