Configure zsh, cleanup worf

This commit is contained in:
Felix Albrigtsen 2023-07-27 11:33:44 +02:00
parent 4f57fa36e3
commit 80489f5025
3 changed files with 86 additions and 13 deletions

View File

@ -14,10 +14,18 @@
};
# System packages for all users
environment.systemPackages = [
pkgs.ripgrep
pkgs.wget
];
environment = {
systemPackages = with pkgs; [
ripgrep
wget
git
];
variables = {
EDITOR = "nvim";
VISUAL = "nvim";
};
};
users.users.felixalb = {
home = "/Users/felixalb";
@ -27,6 +35,21 @@
programs.zsh.enable = true;
system.activationScripts.postActivation.text = ''sudo chsh -s ${pkgs.zsh}/bin/zsh''; # Since it's not possible to declare default shell, run this command after build
fonts = {
fontDir.enable = true;
fonts = with pkgs; [
source-code-pro
font-awesome
hack-font
(nerdfonts.override {
fonts = [
"FiraCode"
];
})
];
};
system.defaults = {
# login window settings
loginwindow = {

View File

@ -5,24 +5,21 @@
, ...
}: {
imports = [
./zsh.nix
];
home.packages = with pkgs; [
bottom
discord
exa
iterm2
neovim
slack
spotify
vscode
];
programs = {
zsh = {
enable = true;
enableAutosuggestions = true;
enableSyntaxHighlighting = true;
history.size = 10000;
};
};
# Copy Applications to ~/Applications to allow them to be launched from Spotlight
disabledModules = [ "targets/darwin/linkapps.nix" ];
home.activation = lib.mkIf pkgs.stdenv.isDarwin {

53
hosts/worf/zsh.nix Normal file
View File

@ -0,0 +1,53 @@
{ pkgs
, lib
, inputs
, config
, ...
}: {
programs = {
zsh = {
enable = true;
prezto = {
enable = true;
editor = {
keymap = "vi";
dotExpansion = true;
};
prompt = {
theme = "paradox";
pwdLength = "long";
showReturnVal = true;
};
terminal.autoTitle = true;
pmodules = [
"environment"
"terminal"
"editor"
"history"
"directory"
"spectrum"
"utility"
"ssh"
"completion"
"git"
"autosuggestions"
"syntax-highlighting"
"history-substring-search"
"prompt"
];
};
shellAliases = {
l = "exa -l";
tree = "exa --tree --icons";
rebuild = "darwin-rebuild switch --flake /Users/felixalb/nix";
gst = "git status -sb";
gcm = "git commit -m";
gps = "git push";
gpl = "git pull";
};
};
};
}