changed home-manager/default to common, added non-starship zsh prompt.

This commit is contained in:
Gabe Venberg 2024-05-07 22:20:11 -05:00
parent 80ac00a7cf
commit f180fc20f1
10 changed files with 64 additions and 24 deletions

View file

@ -89,7 +89,7 @@ inputs.nixpkgs.lib.nixosSystem {
imports = [
../../modules/home-manager/terminal
../../modules/home-manager/nvim
../../modules/home-manager
../../modules/home-manager/common.nix
../../modules/home-manager/email.nix
inputs.nixvim.homeManagerModules.nixvim
];

View file

@ -28,6 +28,7 @@ inputs.home-manager.lib.homeManagerConfiguration {
workProfile.enable = false;
};
};
host.isLaptop = true;
targets.genericLinux.enable = true;
home.username = "gabe";
@ -35,7 +36,7 @@ inputs.home-manager.lib.homeManagerConfiguration {
imports = [
../modules/home-manager/terminal
../modules/home-manager/nvim
../modules/home-manager
../modules/home-manager/common.nix
../modules/home-manager/syncthing.nix
../modules/home-manager/beets.nix
../modules/home-manager/mpd/mpd.nix

View file

@ -39,7 +39,7 @@ inputs.home-manager.lib.homeManagerConfiguration {
imports = [
../modules/home-manager/terminal
../modules/home-manager/nvim
../modules/home-manager
../modules/home-manager/common.nix
../modules/home-manager/syncthing.nix
../modules/home-manager/email.nix
../modules/home-manager/beets.nix

View file

@ -17,7 +17,7 @@ inputs.nixpkgs.lib.nixosSystem {
../../modules/nixos/common.nix
../../modules/nixos/printing.nix
../../modules/both/sound.nix
../../modules/both/networking.nix
../../modules/nixos/networking.nix
../../modules/both/i3
({
config,
@ -90,7 +90,7 @@ inputs.nixpkgs.lib.nixosSystem {
imports = [
../../modules/home-manager/terminal
../../modules/home-manager/nvim
../../modules/home-manager
../../modules/home-manager/common.nix
inputs.nixvim.homeManagerModules.nixvim
];
};

View file

@ -9,7 +9,6 @@
just
fd
sd
scc
tre-command
diskonaut
hyperfine
@ -47,6 +46,7 @@
./zellij
./tiny-irc.nix
./ssh-agent.nix
./direnv
];
programs = {
@ -58,9 +58,5 @@
tealdeer.enable = true;
btop.enable = true;
man.enable = true;
direnv = {
enable = true;
nix-direnv.enable = true;
};
};
}

View file

@ -0,0 +1,11 @@
{
config,
pgks,
lib,
...
}: {
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
}

View file

@ -1,6 +1,7 @@
{
config,
pkgs,
lib,
...
}: {
programs.starship.enableZshIntegration = true;
@ -14,7 +15,8 @@
programs.zsh = {
enable = true;
enableCompletion = true;
initExtra = ''
initExtra = lib.mkMerge [
''
#have the menu highlight while we cycle through options
zstyle ':completion:*' menu select
#case insensitive completion
@ -27,8 +29,34 @@
setopt COMPLETE_ALIASES
#select first item when you press tab the first time.
setopt MENU_COMPLETE
''
(lib.mkif (!config.programs.starship.enable) ''
autoload -U promptinit
promptinit
autoload -U colors
colors
'';
#stuff to show git things.
autoload -Uz vcs_info
setopt prompt_subst
precmd_vcs() {vcs_info}
#when not in a repo, show full path to current directory. when in one, show path from base direcory of the repo.
zstyle ':vcs_info:*' nvcsformats '%~'
zstyle ':vcs_info:*' formats '%r/%S %F{green}[%b]%f'
zstyle ':vcs_info:*' actionformats '%r/%S %F{green}[%b] %F{red}<%a>%f'
#the precmd function, called just before printing the prompt.
function precmd() {
precmd_vcs
}
#Make the right prompt blank, just to be sure.
RPROMPT=""
#on the top line, show a whole bunch of info. botton line should be as minimal as possilbe (just a single char to input next to...)
PROMPT=$'%F{cyan}[%n@%m]%f%F{red}%f$${vcs_info_msg_0_} %F{white}[%D %T]%f\n»'
'')
];
autocd = true;
history = {
ignoreAllDups = true;

View file

@ -26,6 +26,10 @@
description = "machine is a virtual machine";
default = false;
};
isSever = lib.mkEnableOption {
description = "machine is primarily a server";
default = false;
};
};
};
}