From 023cd7e6199ed73c4675533f1d4d07a96b132ff3 Mon Sep 17 00:00:00 2001 From: Alex Stan Date: Wed, 3 Jul 2024 11:06:03 +0300 Subject: [PATCH] zsh :3 Signed-off-by: Alex Stan --- flake.nix | 5 ++- hosts/hermes/configuration.nix | 4 +- users/ultra/configs/emacs/init.el | 2 + users/ultra/home.nix | 68 ++++++++++++++++++++++++++++++- 4 files changed, 75 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index dba3ddf..660d71c 100644 --- a/flake.nix +++ b/flake.nix @@ -66,8 +66,9 @@ { environment.etc."nix/inputs/nixpkgs".source = nixpkgs.outPath; nix.nixPath = [ - "nixpkgs=/etc/nix/inputs/nixpkgs" - "nixos-config=/home/ultra/.nixdotfiles" + "nixpkgs=/etc/nix/inputs/nixpkgs" + "nixos=/etc/nix/inputs/nixpkgs" + "nixos-config=/home/ultra/.nixdotfiles" ]; } diff --git a/hosts/hermes/configuration.nix b/hosts/hermes/configuration.nix index 1514688..ebb813d 100644 --- a/hosts/hermes/configuration.nix +++ b/hosts/hermes/configuration.nix @@ -127,7 +127,8 @@ in { qFlipper remmina ]; - shell = pkgs.fish; + shell = pkgs.zsh; + ignoreShellProgramCheck = true; # I configured zsh with home-manager }; environment.variables = { @@ -197,6 +198,7 @@ in { # NVIDIA hardware.opengl = { enable = true; + driSupport32Bit = true; }; services.xserver.videoDrivers = [ "nvidia" ]; diff --git a/users/ultra/configs/emacs/init.el b/users/ultra/configs/emacs/init.el index a94f571..12f05f5 100644 --- a/users/ultra/configs/emacs/init.el +++ b/users/ultra/configs/emacs/init.el @@ -117,3 +117,5 @@ (add-hook 'prog-mode-hoow 'rainbow-mode) +(add-hook 'eshell-mode-hook #'esh-autosuggest-mode) +(define-key eshell-mode-map [remap eshell-pcomplete] 'helm-esh-pcomplete) diff --git a/users/ultra/home.nix b/users/ultra/home.nix index 5ca8e01..e44be79 100644 --- a/users/ultra/home.nix +++ b/users/ultra/home.nix @@ -61,6 +61,11 @@ let geiser rainbow-delimiters rainbow-mode + esh-autosuggest + fish-completion + steam + zone-sl + helm ]; }); helix = inputs.helix.packages.${pkgs.system}.default; @@ -123,7 +128,7 @@ in { zoom-us google-chrome zoxide - starship + # starship atuin clang (lib.hiPrio gcc) @@ -259,6 +264,7 @@ in { (inputs.nix-inst.packages.${pkgs.system}.default) dotnet-runtime_6 tea + thefuck ]; file = { "emacs.d/everblush-theme.el".source = ./configs/emacs/everblush-theme.el; @@ -289,6 +295,66 @@ in { }; home-manager.enable = true; # fish.enable = true; + zsh = { + enable = true; + enableCompletion = true; + autocd = true; + autosuggestion = { + enable = true; + }; + syntaxHighlighting = { + enable = true; + }; + shellAliases = { + cls = "clear"; + hmup = "nh home switch ~/.nixdotfiles"; + osup = "nh os switch ~/.nixdotfiles"; + # emcc = "emacsclient -c"; + }; + oh-my-zsh = { + enable = true; + plugins = [ "git" "thefuck" "history-substring-search" "fzf" ]; + theme = "cloud"; + }; + history = { + size = 256 * 1024; + path = "${config.xdg.dataHome}/zsh/history"; + extended = true; + }; + initExtra = '' + eval $(thefuck --alias) + eval $(starship init zsh) + ''; + zsh-abbr = { + enable = true; + abbreviations = { + emcc = "emacsclient -c"; + sam = "git commit -sam"; + hmbk = "home-manager switch --flake ~/.nixdotfiles -b backup"; + }; + }; + }; + + zoxide = { + enable = true; + enableNushellIntegration = true; + enableZshIntegration = true; + }; + + starship = { + enable = true; + settings = { + "$schema" = "https://starship.rs/config-schema.json"; + add_newline = false; + character = { + success_symbol = "[➜](bold green)"; + error_symbol = "[➜](bold red)"; + }; + format = '' + $directory$git$nodejs$container$sudo$nix_shell$character + ''; + }; + }; # Helix config helix = {