feat(zsh): move to official omz

This commit is contained in:
2025-06-15 13:54:03 +08:00
parent 2f170b9e08
commit 2a4694b633
4 changed files with 34 additions and 69 deletions

58
flake.lock generated
View File

@@ -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": {

View File

@@ -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: {

View File

@@ -44,7 +44,6 @@ lib.my.makeSwitch {
killall
];
programs.zsh.enable = true;
programs.dconf.enable = true;
my.home = {

View File

@@ -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";