From 2a4694b633175847a36fb1a76089628857989122 Mon Sep 17 00:00:00 2001 From: imxyy_soope_ Date: Sun, 15 Jun 2025 13:54:03 +0800 Subject: [PATCH] feat(zsh): move to official omz --- flake.lock | 58 +----------------------------------- flake.nix | 5 ---- modules/cli/misc/default.nix | 1 - modules/cli/shell/zsh.nix | 39 ++++++++++++++++++++---- 4 files changed, 34 insertions(+), 69 deletions(-) diff --git a/flake.lock b/flake.lock index 01d4b66..f139c4e 100644 --- a/flake.lock +++ b/flake.lock @@ -339,24 +339,6 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "fromYaml": { "flake": false, "locked": { @@ -965,28 +947,6 @@ "type": "github" } }, - "omz": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1704103295, - "narHash": "sha256-BAwAKajpAUC78z0IMJt6LXGV8dLdUMYXe6CxbGA0JP0=", - "owner": "imxyy1soope1", - "repo": "omz", - "rev": "e581a6d0d47291a3ddd7da5046bea59b29631a3f", - "type": "github" - }, - "original": { - "owner": "imxyy1soope1", - "ref": "master", - "repo": "omz", - "type": "github" - } - }, "quickshell": { "inputs": { "nixpkgs": [ @@ -1024,7 +984,6 @@ "nixpkgs-stable": "nixpkgs-stable", "nixpkgs-unstable": "nixpkgs-unstable", "nur": "nur", - "omz": "omz", "quickshell": "quickshell", "sops-nix": "sops-nix", "stylix": "stylix", @@ -1084,7 +1043,7 @@ "nixpkgs" ], "nur": "nur_2", - "systems": "systems_3", + "systems": "systems_2", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -1135,21 +1094,6 @@ "type": "github" } }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tinted-foot": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 791373f..34c68de 100644 --- a/flake.nix +++ b/flake.nix @@ -23,10 +23,6 @@ # NUR nur.url = "github:nix-community/NUR"; - # OMZ - omz.url = "github:imxyy1soope1/omz/master"; - omz.inputs.nixpkgs.follows = "nixpkgs"; - # Niri niri.url = "github:sodiboo/niri-flake"; niri.inputs.nixpkgs.follows = "nixpkgs"; @@ -116,7 +112,6 @@ let overlays = builtins.attrValues self.overlays ++ [ inputs.go-musicfox.overlays.default - inputs.omz.overlays.default inputs.niri.overlays.niri inputs.fenix.overlays.default (final: prev: { diff --git a/modules/cli/misc/default.nix b/modules/cli/misc/default.nix index eba71ce..9c00481 100644 --- a/modules/cli/misc/default.nix +++ b/modules/cli/misc/default.nix @@ -44,7 +44,6 @@ lib.my.makeSwitch { killall ]; - programs.zsh.enable = true; programs.dconf.enable = true; my.home = { diff --git a/modules/cli/shell/zsh.nix b/modules/cli/shell/zsh.nix index a01f27d..5320e82 100644 --- a/modules/cli/shell/zsh.nix +++ b/modules/cli/shell/zsh.nix @@ -17,9 +17,24 @@ lib.my.makeSwitch { my.home = let stateHome = config.my.home.xdg.stateHome; + zsh-syntax-highlighting = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-syntax-highlighting"; + rev = "0.8.0"; + hash = "sha256-iJdWopZwHpSyYl5/FQXEW7gl/SrKaYDEtTH9cGP7iPo="; + }; + fzf-tab = pkgs.fetchFromGitHub { + owner = "Aloxaf"; + repo = "fzf-tab"; + rev = "v1.2.0"; + hash = "sha256-q26XVS/LcyZPRqDNwKKA9exgBByE0muyuNb0Bbar2lY="; + }; in { - home.packages = [ pkgs.omz ]; + home.packages = with pkgs; [ + fzf + zoxide + ]; programs.zsh = { enable = true; dotDir = ".config/zsh"; @@ -29,14 +44,26 @@ lib.my.makeSwitch { "la" ]; }; - initContent = '' - source ${pkgs.omz}/share/omz/omz.zsh + initContent = lib.mkAfter '' + source ${fzf-tab}/fzf-tab.plugin.zsh + + eval "$(zoxide init zsh)" + source ${zsh-syntax-highlighting}/zsh-syntax-highlighting.plugin.zsh + source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh ''; - sessionVariables = { - _ZL_DATA = "${stateHome}/zlua"; - _FZF_HISTORY = "${stateHome}/fzf_history"; + oh-my-zsh = { + enable = true; + theme = "gentoo"; + plugins = [ + "git" + "git-extras" + "extract" + "sudo" + "dotenv" + ]; }; shellAliases = { + x = "extract"; ls = "lsd"; svim = "sudoedit"; nf = "neofetch";