summaryrefslogtreecommitdiff
path: root/nixos/modules/system
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/services/default.nix7
-rw-r--r--nixos/modules/system/users/default.nix25
2 files changed, 29 insertions, 3 deletions
diff --git a/nixos/modules/system/services/default.nix b/nixos/modules/system/services/default.nix
index 74ac531..571ae3a 100644
--- a/nixos/modules/system/services/default.nix
+++ b/nixos/modules/system/services/default.nix
@@ -14,4 +14,11 @@
SystemMaxUse=50M
MaxRetentionSec=1month
'';
+
+ # Cap core dumps so a crashing app can't fill the root partition with
+ # multi-GB crash dumps (e.g. java/electron segfaults).
+ systemd.coredump.settings.Coredump = {
+ ProcessSizeMax = "512M";
+ Storage = "external";
+ };
}
diff --git a/nixos/modules/system/users/default.nix b/nixos/modules/system/users/default.nix
index d795a64..d9ac254 100644
--- a/nixos/modules/system/users/default.nix
+++ b/nixos/modules/system/users/default.nix
@@ -24,7 +24,13 @@
];
};
- # ZSH + completion, oh-my-zsh, autosuggestions, and fzf key bindings.
+ # fzf -- proper key bindings + completion for zsh.
+ programs.fzf = {
+ fuzzyCompletion = true;
+ keybindings = true;
+ };
+
+ # ZSH + completion, oh-my-zsh, autosuggestions.
programs.zsh = {
enable = true;
enableCompletion = true;
@@ -35,8 +41,21 @@
strategy = [ "history" "completion" ];
};
interactiveShellInit = ''
- source ${pkgs.fzf}/share/fzf/key-bindings.zsh
- source ${pkgs.fzf}/share/fzf/completion.zsh
+ # Fish-style full-screen Ctrl+R history search.
+ export FZF_CTRL_R_OPTS="
+ --layout=reverse
+ --scheme=history
+ --height=100%
+ --border=sharp
+ --border-label=' Ctrl+R '
+ --highlight-line
+ --pointer=→
+ --info=inline-right
+ --header-first
+ --header='enter: accept · ctrl-/ : toggle preview'
+ --preview='echo {}' --preview-window=down:3:hidden:wrap
+ --bind=ctrl-/:toggle-preview
+ "
'';
shellAliases = {
ls = "eza -al --icons=auto";