fix: terminfo error on macOS

This commit is contained in:
Ryan Yin
2023-12-08 14:22:33 +08:00
parent cb6f46aea8
commit 56f2abc737
5 changed files with 33 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
{pkgs, ...}: {
{pkgs, config, ...}: {
##########################################################################
#
# Install all apps and packages here.
@@ -23,7 +23,12 @@
gnugrep # replacee macos's grep
gnutar # replacee macos's tar
];
environment.variables.EDITOR = "nvim";
environment.variables = {
# Fix https://github.com/LnL7/nix-darwin/wiki/Terminfo-issues
# TERMINFO_DIRS = map (path: path + "/share/terminfo") config.environment.profiles ++ [ "/usr/share/terminfo" ];
EDITOR = "nvim";
};
# Create /etc/zshrc that loads the nix-darwin environment.
# this is required if you want to use darwin's default shell - zsh

View File

@@ -43,6 +43,9 @@
};
users.users.root.initialHashedPassword = "$7$CU..../....X6uvZYnFD.i1CqqFFNl4./$4vgqzIPyw5XBr0aCDFbY/UIRRJr7h5SMGoQ/ZvX3FP2";
# fix for `sudo xxx` in kitty/wezterm and other modern terminal emulators
security.sudo.keepTerminfo = true;
# DO NOT promote the specified user to input password for `nix-store` and `nix-copy-closure`
security.sudo.extraRules = [
{