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" "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": { "fromYaml": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -965,28 +947,6 @@
"type": "github" "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": { "quickshell": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -1024,7 +984,6 @@
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur", "nur": "nur",
"omz": "omz",
"quickshell": "quickshell", "quickshell": "quickshell",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"stylix": "stylix", "stylix": "stylix",
@@ -1084,7 +1043,7 @@
"nixpkgs" "nixpkgs"
], ],
"nur": "nur_2", "nur": "nur_2",
"systems": "systems_3", "systems": "systems_2",
"tinted-foot": "tinted-foot", "tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty", "tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes", "tinted-schemes": "tinted-schemes",
@@ -1135,21 +1094,6 @@
"type": "github" "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": { "tinted-foot": {
"flake": false, "flake": false,
"locked": { "locked": {

View File

@@ -23,10 +23,6 @@
# NUR # NUR
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
# OMZ
omz.url = "github:imxyy1soope1/omz/master";
omz.inputs.nixpkgs.follows = "nixpkgs";
# Niri # Niri
niri.url = "github:sodiboo/niri-flake"; niri.url = "github:sodiboo/niri-flake";
niri.inputs.nixpkgs.follows = "nixpkgs"; niri.inputs.nixpkgs.follows = "nixpkgs";
@@ -116,7 +112,6 @@
let let
overlays = builtins.attrValues self.overlays ++ [ overlays = builtins.attrValues self.overlays ++ [
inputs.go-musicfox.overlays.default inputs.go-musicfox.overlays.default
inputs.omz.overlays.default
inputs.niri.overlays.niri inputs.niri.overlays.niri
inputs.fenix.overlays.default inputs.fenix.overlays.default
(final: prev: { (final: prev: {

View File

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

View File

@@ -17,9 +17,24 @@ lib.my.makeSwitch {
my.home = my.home =
let let
stateHome = config.my.home.xdg.stateHome; 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 in
{ {
home.packages = [ pkgs.omz ]; home.packages = with pkgs; [
fzf
zoxide
];
programs.zsh = { programs.zsh = {
enable = true; enable = true;
dotDir = ".config/zsh"; dotDir = ".config/zsh";
@@ -29,14 +44,26 @@ lib.my.makeSwitch {
"la" "la"
]; ];
}; };
initContent = '' initContent = lib.mkAfter ''
source ${pkgs.omz}/share/omz/omz.zsh 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 = { oh-my-zsh = {
_ZL_DATA = "${stateHome}/zlua"; enable = true;
_FZF_HISTORY = "${stateHome}/fzf_history"; theme = "gentoo";
plugins = [
"git"
"git-extras"
"extract"
"sudo"
"dotenv"
];
}; };
shellAliases = { shellAliases = {
x = "extract";
ls = "lsd"; ls = "lsd";
svim = "sudoedit"; svim = "sudoedit";
nf = "neofetch"; nf = "neofetch";