mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-09 03:56:04 +01:00
Merge d7ca2f1cca into 0562fef070
This commit is contained in:
commit
f949eab6fc
3 changed files with 18 additions and 1 deletions
|
|
@ -18,6 +18,12 @@ in
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
enableConfig = lib.mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "let home-manager configure history settings";
|
||||||
|
};
|
||||||
|
|
||||||
append = mkOption {
|
append = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
|
@ -170,7 +176,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = lib.mkIf cfg.history.enableConfig {
|
||||||
warnings =
|
warnings =
|
||||||
lib.optionals (!lib.hasPrefix "/" cfg.history.path && !lib.hasInfix "$" cfg.history.path)
|
lib.optionals (!lib.hasPrefix "/" cfg.history.path && !lib.hasInfix "$" cfg.history.path)
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
zsh-dotdir-default = import ./dotdir.nix "default";
|
zsh-dotdir-default = import ./dotdir.nix "default";
|
||||||
zsh-dotdir-relative = import ./dotdir.nix "relative";
|
zsh-dotdir-relative = import ./dotdir.nix "relative";
|
||||||
zsh-dotdir-shell-variable = import ./dotdir.nix "shell-variable";
|
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-ignore-pattern = ./history-ignore-pattern.nix;
|
||||||
zsh-history-path-absolute = import ./history-path.nix "absolute";
|
zsh-history-path-absolute = import ./history-path.nix "absolute";
|
||||||
zsh-history-path-default = import ./history-path.nix "default";
|
zsh-history-path-default = import ./history-path.nix "default";
|
||||||
|
|
|
||||||
10
tests/modules/programs/zsh/history-disable-config.nix
Normal file
10
tests/modules/programs/zsh/history-disable-config.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
history.enableConfig = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileNotRegex home-files/.zshrc "setopt HIST_.*"
|
||||||
|
'';
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue