mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
atuin: add forceOverwriteSettings option (#8140)
This commit is contained in:
@@ -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;
|
||||
};
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user