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:
parent
747a9a774e
commit
827f2a2337
1 changed files with 15 additions and 0 deletions
|
|
@ -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;
|
||||
};
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue