1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00
This commit is contained in:
Emma 2025-11-06 21:09:15 +00:00 committed by GitHub
commit f949eab6fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 1 deletions

View file

@ -18,6 +18,12 @@ in
{ config, ... }:
{
options = {
enableConfig = lib.mkOption {
type = types.bool;
default = true;
description = "let home-manager configure history settings";
};
append = mkOption {
type = types.bool;
default = false;
@ -170,7 +176,7 @@ in
};
};
config = {
config = lib.mkIf cfg.history.enableConfig {
warnings =
lib.optionals (!lib.hasPrefix "/" cfg.history.path && !lib.hasInfix "$" cfg.history.path)
[

View file

@ -5,6 +5,7 @@
zsh-dotdir-default = import ./dotdir.nix "default";
zsh-dotdir-relative = import ./dotdir.nix "relative";
zsh-dotdir-shell-variable = import ./dotdir.nix "shell-variable";
zsh-history-disable-config = ./history-disable-config.nix;
zsh-history-ignore-pattern = ./history-ignore-pattern.nix;
zsh-history-path-absolute = import ./history-path.nix "absolute";
zsh-history-path-default = import ./history-path.nix "default";

View file

@ -0,0 +1,10 @@
{
programs.zsh = {
enable = true;
history.enableConfig = false;
};
nmt.script = ''
assertFileNotRegex home-files/.zshrc "setopt HIST_.*"
'';
}