1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-03 15:41:02 +01:00

atuin: add forceOverwriteSettings option (#8140)

This commit is contained in:
Charlie Collard 2025-11-12 16:24:03 +00:00 committed by GitHub
parent 747a9a774e
commit 827f2a2337
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -89,6 +89,20 @@ in
''; '';
}; };
forceOverwriteSettings = mkOption {
type = types.bool;
default = false;
description = ''
When enabled, force overwriting of the Atuin configuration file
({file}`$XDG_CONFIG_HOME/atuin/config.toml`).
Any existing Atuin configuration will be lost.
Enabling this is useful when adding settings for the first time
because Atuin writes its default config file after every single
shell command, which can make it difficult to manually remove.
'';
};
themes = mkOption { themes = mkOption {
type = types.attrsOf ( type = types.attrsOf (
types.oneOf [ types.oneOf [
@ -155,6 +169,7 @@ in
(mkIf (cfg.settings != { }) { (mkIf (cfg.settings != { }) {
"atuin/config.toml" = { "atuin/config.toml" = {
source = tomlFormat.generate "atuin-config" cfg.settings; source = tomlFormat.generate "atuin-config" cfg.settings;
force = cfg.forceOverwriteSettings;
}; };
}) })