From bb9c8a9825d4d694201522a7352298da258d6356 Mon Sep 17 00:00:00 2001 From: twoneis Date: Fri, 3 Nov 2023 04:49:49 +0100 Subject: [PATCH] switch to zsh --- base-system/desktop-config.nix | 3 +++ base-system/home.nix | 15 +++++++++++++++ base-system/surface-config.nix | 3 +++ base-system/system-packages.nix | 1 + 4 files changed, 22 insertions(+) diff --git a/base-system/desktop-config.nix b/base-system/desktop-config.nix index f49117c..7d432df 100644 --- a/base-system/desktop-config.nix +++ b/base-system/desktop-config.nix @@ -13,6 +13,9 @@ # Enable nix flakes nix.settings.experimental-features = [ "nix-command" "flakes" ]; + # Add zsh to link path to enable completion for system packages + environment.pathsToLink = [ "/share/zsh" ]; + # Disable documentation documentation.nixos.enable = false; diff --git a/base-system/home.nix b/base-system/home.nix index 7ece974..3440db3 100644 --- a/base-system/home.nix +++ b/base-system/home.nix @@ -5,6 +5,12 @@ home.username = "twoneis"; home.homeDirectory = "/home/twoneis"; + systemd.user.sessionVariables = { + EDITOR = "hx"; + SUDO_EDITOR = "hx"; + VISUAL = "hx"; + }; + programs = { home-manager = { enable = true; @@ -27,6 +33,15 @@ enable = true; settings = import ./dotfiles/alacritty/alacritty.nix; }; + + zsh = { + enable = true; + enabelAutosuggestions = true; + enableCompletion = true; + enableVteIntegration = true; + dotDir = ".config/zsh"; + history.ignoreDups = true; + }; }; diff --git a/base-system/surface-config.nix b/base-system/surface-config.nix index aa47239..42526c3 100644 --- a/base-system/surface-config.nix +++ b/base-system/surface-config.nix @@ -13,6 +13,9 @@ # Enable nix flakes nix.settings.experimental-features = [ "nix-command" "flakes" ]; + # Add zsh to link path to enable completion for system packages + environment.pathsToLink = [ "/share/zsh" ]; + # Disable documentation documentation.nixos.enable = false; diff --git a/base-system/system-packages.nix b/base-system/system-packages.nix index 0040acf..0f1715f 100644 --- a/base-system/system-packages.nix +++ b/base-system/system-packages.nix @@ -1,5 +1,6 @@ pkgs: with pkgs; [ alacritty + zsh git gh man-pages