diff --git a/modules/programs/atuin.nix b/modules/programs/atuin.nix index d68e16467..8df8b37fd 100644 --- a/modules/programs/atuin.nix +++ b/modules/programs/atuin.nix @@ -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 { type = types.attrsOf ( types.oneOf [ @@ -155,6 +169,7 @@ in (mkIf (cfg.settings != { }) { "atuin/config.toml" = { source = tomlFormat.generate "atuin-config" cfg.settings; + force = cfg.forceOverwriteSettings; }; })