From 551cb398f50bcc5ac784dce66304d034f8549c82 Mon Sep 17 00:00:00 2001 From: Florian Schmitt Date: Thu, 11 Jan 2024 21:19:05 +0300 Subject: [PATCH] refact(cli) : all zsh to home manager --- dotfiles/kitty/session.conf | 4 ++-- modules/console.nix | 38 +++---------------------------------- modules/home-config.nix | 34 ++++++++++++++++++++++++++++++++- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/dotfiles/kitty/session.conf b/dotfiles/kitty/session.conf index 30cd7f5..fc16005 100644 --- a/dotfiles/kitty/session.conf +++ b/dotfiles/kitty/session.conf @@ -1,6 +1,6 @@ -new_tab Tmux +new_tab Terminal layout tall -cd ~/Developpements/ +launch --title Terminal --cwd=~/Developpements #launch zsh -c tmux -f ~/.config/tmux/tmux.conf new-session -A -s Terminal new_tab YesWiki Dev diff --git a/modules/console.nix b/modules/console.nix index d468629..6bba525 100644 --- a/modules/console.nix +++ b/modules/console.nix @@ -2,6 +2,8 @@ { lib, pkgs, ... }: { + programs.zsh.enable = true; + services = { mpd.enable = true; mpd.musicDirectory = "/home/mrflos/Musique"; @@ -16,41 +18,7 @@ } ''; }; - programs = { -# mosh.enable = true; -# neovim = { -# enable = true; -# viAlias = true; -# vimAlias = true; -# }; - ssh.startAgent = true; - starship = { - enable = true; - settings = with builtins; fromTOML (readFile ../dotfiles/starship/starship.toml); - }; - zsh = { - enable = true; - autosuggestions.enable = true; - shellAliases = { - #tmux = "tmux -f ~/.config/tmux/tmux.conf attach || tmux -f ~/.config/tmux/tmux.conf new"; - ls = "lsd --hyperlink=auto"; - icat = "kitty +kitten icat"; - nixedit = "vi /etc/nixos"; - nixupdate = "sudo nix-channel --update && sudo nixos-rebuild switch"; - nixclean = "sudo nix-env --delete-generations old --profile /nix/var/nix/profiles/system && sudo /nix/var/nix/profiles/system/bin/switch-to-configuration switch && sudo nix-store --gc"; - }; - initExtra = '' -export BUN_INSTALL="$HOME/.bun" -export PATH="$BUN_INSTALL/bin:$PATH" - ''; - #shellInit = "cd ~/Developpements;"; - ohMyZsh = { - enable = true; - plugins = [ "git" "ssh-agent" ]; - theme = "robbyrussell"; - }; - }; - }; + # List packages installed in system profile. To search, run: # $ nix search wget diff --git a/modules/home-config.nix b/modules/home-config.nix index 9a3b3aa..0db8d6e 100644 --- a/modules/home-config.nix +++ b/modules/home-config.nix @@ -202,7 +202,39 @@ in { profiles.default = { isDefault = true; }; }; - zsh.enable = true; + starship = { + enable = true; + settings = with builtins; fromTOML (readFile ../dotfiles/starship/starship.toml); + }; + + zsh = { + enable = true; + enableAutosuggestions = true; + enableCompletion = true; + shellAliases = { + #tmux = "tmux -f ~/.config/tmux/tmux.conf attach || tmux -f ~/.config/tmux/tmux.conf new"; + ls = "lsd --hyperlink=auto"; + icat = "kitty +kitten icat"; + nixedit = "vi /etc/nixos"; + nixupdate = "sudo nix-channel --update && sudo nixos-rebuild switch"; + nixclean = "sudo nix-env --delete-generations old --profile /nix/var/nix/profiles/system && sudo /nix/var/nix/profiles/system/bin/switch-to-configuration switch && sudo nix-store --gc"; + }; + initExtra = '' + plugins=(git ssh-agent) + + export BUN_INSTALL="$HOME/.bun" + export PATH="$BUN_INSTALL/bin:$PATH" + ''; + #shellInit = "cd ~/Developpements;"; + #ohMyZsh = { + # enable = true; + # plugins = [ "git" "ssh-agent" ]; + # theme = "robbyrussell"; + #}; + }; }; + + services.ssh-agent.enable = true; + }; }