From 0f38139d45fedc1d06ee4f3dc5cb7fe31058f8a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20K=C3=A4nner?= Date: Thu, 7 Mar 2024 11:56:28 +0100 Subject: [PATCH] 100 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * --- hosts/MaxNixosLaptop/home.nix | 67 ++--------------------------------- modules/home-manager/sway.nix | 2 +- modules/home-manager/zsh.nix | 62 ++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 66 deletions(-) create mode 100644 modules/home-manager/zsh.nix diff --git a/hosts/MaxNixosLaptop/home.nix b/hosts/MaxNixosLaptop/home.nix index cd707f4..59f618b 100644 --- a/hosts/MaxNixosLaptop/home.nix +++ b/hosts/MaxNixosLaptop/home.nix @@ -7,6 +7,8 @@ imports = [ # sway as windowmanager ../../modules/home-manager/sway.nix + # zsh config + ../../modules/home-manager/zsh.nix ]; # Home Manager needs a bit of information about you and the paths it should @@ -28,13 +30,9 @@ # The home.packages option allows you to install Nix packages into your # environment. home.packages = with pkgs; [ - zsh - starship - zoxide lazygit btop bat - eza unzip rustup nextcloud-client @@ -94,67 +92,6 @@ EDITOR = "nvim"; }; - programs.zsh = { - enable = true; - enableAutosuggestions = true; - enableCompletion = true; - defaultKeymap = "emacs"; - dotDir = ".config/zsh"; - history.expireDuplicatesFirst = true; - history.path = "$ZDOTDIR/.zsh_history"; - historySubstringSearch.enable = true; - shellAliases = { - ls = "exa --icons -a --group-directories-first"; - diff = "diff --color=auto"; - grep = "grep --color=auto"; - ip = "ip --color=auto"; - mkdir = "mkdir -p"; - gst = "git status"; - gc = "git commit"; - ga = "git add"; - gpl = "git pull"; - gpu = "git push"; - gd = "git diff"; - gch = "git checkout"; - gs = "git switch"; - gre = "git restore"; - gr = "git remote"; - gcl = "git clone"; - glg = "git log --graph --abbrev-commit --decorate --format=format:'%C(bold green)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold yellow)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all"; - gb = "git branch"; - gm = "git merge"; - gf = "git fetch"; - rebuild = "~/dotfiles/nixos/rebuild.sh"; - }; - syntaxHighlighting.enable = true; - syntaxHighlighting.highlighters = ["main" "brackets"]; - }; - - programs.starship = { - enable = true; - enableBashIntegration = true; - enableZshIntegration = true; - settings = { - add_newline = false; - command_timeout = 5000; - character = { - success_symbol = "[->](bold green)"; - error_symbol = "[ X](bold red)"; - }; - cmd_duration = { - min_time = 500; - show_milliseconds = true; - }; - }; - }; - - programs.zoxide = { - enable = true; - enableBashIntegration = true; - enableZshIntegration = true; - options = ["--cmd cd"]; - }; - services.nextcloud-client.enable = true; services.mpd = { diff --git a/modules/home-manager/sway.nix b/modules/home-manager/sway.nix index d26d413..378399d 100644 --- a/modules/home-manager/sway.nix +++ b/modules/home-manager/sway.nix @@ -17,7 +17,7 @@ enable = true; systemd = { enable = true; - xdgAutostart = true; + xdgAutostart = false; }; wrapperFeatures = { diff --git a/modules/home-manager/zsh.nix b/modules/home-manager/zsh.nix new file mode 100644 index 0000000..432d75e --- /dev/null +++ b/modules/home-manager/zsh.nix @@ -0,0 +1,62 @@ +{pkgs, ...}: { + programs.zsh = { + enable = true; + enableAutosuggestions = true; + enableCompletion = true; + defaultKeymap = "emacs"; + dotDir = ".config/zsh"; + history.expireDuplicatesFirst = true; + history.path = "$ZDOTDIR/.zsh_history"; + historySubstringSearch.enable = true; + shellAliases = { + ls = "${pkgs.eza}/bin/eza --icons -a --group-directories-first"; + diff = "diff --color=auto"; + grep = "grep --color=auto"; + ip = "ip --color=auto"; + mkdir = "mkdir -p"; + gst = "git status"; + gc = "git commit"; + ga = "git add"; + gpl = "git pull"; + gpu = "git push"; + gd = "git diff"; + gch = "git checkout"; + gs = "git switch"; + gre = "git restore"; + gr = "git remote"; + gcl = "git clone"; + glg = "git log --graph --abbrev-commit --decorate --format=format:'%C(bold green)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold yellow)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all"; + gb = "git branch"; + gm = "git merge"; + gf = "git fetch"; + rebuild = "~/dotfiles/nixos/rebuild.sh"; + }; + syntaxHighlighting.enable = true; + syntaxHighlighting.highlighters = ["main" "brackets"]; + }; + + programs.starship = { + enable = true; + enableBashIntegration = true; + enableZshIntegration = true; + settings = { + add_newline = false; + command_timeout = 5000; + character = { + success_symbol = "[➥](bold green)"; + error_symbol = "[✖](bold red)"; + }; + cmd_duration = { + min_time = 500; + show_milliseconds = true; + }; + }; + }; + + programs.zoxide = { + enable = true; + enableBashIntegration = true; + enableZshIntegration = true; + options = ["--cmd cd"]; + }; +}