fixed zsh package nonsense (i hate carapace)

This commit is contained in:
2026-07-04 16:11:10 +01:00
parent d28858fb45
commit a02f96f6ca
6 changed files with 270 additions and 39 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
.session .session
/nixos.qcow2 /nixos.qcow2
/result /result
/HACKSTATION.qcow2
/result-man

258
flake.lock generated
View File

@@ -37,6 +37,21 @@
"type": "github" "type": "github"
} }
}, },
"crane": {
"locked": {
"lastModified": 1781825982,
"narHash": "sha256-SlXKwIRIhrOSAcTjCB3ftPLzJWZStQIPS7J1FlZPnKk=",
"owner": "ipetkov",
"repo": "crane",
"rev": "469fd08d0bcf6926321fa973c6777fbc87785dd7",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -58,11 +73,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1778716662, "lastModified": 1782949081,
"narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", "narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", "rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -89,6 +104,42 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_3"
},
"locked": {
"lastModified": 1768135262,
"narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_4"
},
"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"
}
},
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -113,6 +164,28 @@
} }
}, },
"home-manager": { "home-manager": {
"inputs": {
"nixpkgs": [
"hyprland",
"otter-launcher",
"nixpkgs"
]
},
"locked": {
"lastModified": 1769638001,
"narHash": "sha256-hGwdJ/+oo+IRo2TiWV/V8BWWptQihcdFV/olTONaHqg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "bd9f031efc634be4b80c5090b9171cc3a9f8e49c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"otter-launcher", "otter-launcher",
@@ -200,15 +273,20 @@
"hyprland": { "hyprland": {
"inputs": { "inputs": {
"hyprland": "hyprland_2", "hyprland": "hyprland_2",
"nixpkgs": "nixpkgs_2", "nixpkgs": [
"wrappers": "wrappers" "nixpkgs"
],
"otter-launcher": "otter-launcher",
"woomer": "woomer",
"wrappers": "wrappers",
"wshowkeys": "wshowkeys"
}, },
"locked": { "locked": {
"lastModified": 1783110854, "lastModified": 1783173691,
"narHash": "sha256-qDk/Ds3tODJxqNo1n+N1GKURtHw2hoJnE3OuOJwDzgM=", "narHash": "sha256-t6ujNphnp5ix/WOrotyjORkSnt7YlpcU4segqd4bo2w=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "0fea6f14505e1e381a3583d99be671d9461325de", "rev": "a9b2d46580076ba05bd37637c8394d5e7c654bff",
"revCount": 31, "revCount": 36,
"type": "git", "type": "git",
"url": "https://git.voidarc.co.uk/voidarc/hypr" "url": "https://git.voidarc.co.uk/voidarc/hypr"
}, },
@@ -314,11 +392,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1783106555, "lastModified": 1783110106,
"narHash": "sha256-D+CFZ784rsLLhIjGjlmiR8TBbjZ1N8NbD+3u8HF0nuw=", "narHash": "sha256-PRnnFkTfQ+sQHSrcWw0512zEMNp5/1WHJeVuDf6FmxI=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "37b02954ec347642edcb8eefdf15846d2da9180f", "rev": "14fa1fd0273973b7a40966b4fa9e081d6bf67dae",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -537,11 +615,11 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1777168982, "lastModified": 1782614948,
"narHash": "sha256-GOkGPcboWE9BmGCRMLX3worL4EMnsnG8MyKmXNeYuhQ=", "narHash": "sha256-ePjCwr1sNm9NYUqywL7QfK3JnlS015msC+eBu2zKlp8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "f5901329dade4a6ea039af1433fb087bd9c1fe14", "rev": "db3f255737b94216eb71cce308e2912cf6bc2d7c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -565,18 +643,33 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs-lib_3": {
"locked": { "locked": {
"lastModified": 1782723713, "lastModified": 1765674936,
"narHash": "sha256-oPXCU/SSUokcGaJREHibG1CBX3+s/W7orDWQOZDsEeQ=", "narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=",
"owner": "nixos", "owner": "nix-community",
"repo": "nixpkgs", "repo": "nixpkgs.lib",
"rev": "b5aa0fbd538984f6e3d201be0005b4463d8b09f8", "rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nix-community",
"ref": "nixos-unstable", "repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1782175435,
"narHash": "sha256-EMzXKmnOtBQ2MnvpiNOm7E+kOMvdPrIKaeg52Tip2Uk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "89570f24e97e614aa34aa9ab1c927b6578a43775",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@@ -599,11 +692,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1782847225, "lastModified": 1782999065,
"narHash": "sha256-JC9PjqKYG9ve5U8aDOLQipp3+KLANBHUvGdLZlxzdKI=", "narHash": "sha256-5Dgj5+pIQYZKrXUGaLCk7CKfN3MmpwIhO94++WVxvng=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "95ca1e203c0750115fd4a6f17d5a245dfe6b1edd", "rev": "80d591ed473cfc46329932c2aadac9b435342c7c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -685,6 +778,7 @@
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_2",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": [ "nixpkgs": [
"hyprland",
"nixpkgs" "nixpkgs"
], ],
"systems": "systems_2" "systems": "systems_2"
@@ -703,6 +797,29 @@
"type": "github" "type": "github"
} }
}, },
"otter-launcher_2": {
"inputs": {
"flake-parts": "flake-parts_3",
"home-manager": "home-manager_2",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_5"
},
"locked": {
"lastModified": 1783145565,
"narHash": "sha256-czL1P2nQV3JrbV6J2b3jXnWcz+Kbz+xhaXKk3+wdnF0=",
"owner": "kuokuo123",
"repo": "otter-launcher",
"rev": "2e35ce8c7ba6f5e4d98bf4c9073f5fa91143744d",
"type": "github"
},
"original": {
"owner": "kuokuo123",
"repo": "otter-launcher",
"type": "github"
}
},
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@@ -734,7 +851,7 @@
"import-tree": "import-tree", "import-tree": "import-tree",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_4",
"nvim": "nvim", "nvim": "nvim",
"otter-launcher": "otter-launcher", "otter-launcher": "otter-launcher_2",
"wrappers": "wrappers_3" "wrappers": "wrappers_3"
} }
}, },
@@ -768,6 +885,71 @@
"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"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_5": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"woomer": {
"inputs": {
"crane": "crane",
"nixpkgs": "nixpkgs_2",
"systems": "systems_3"
},
"locked": {
"lastModified": 1782685056,
"narHash": "sha256-WJasTKjf1hcxdCc+jKL3dU5RIL2zdYJ/OBFTmIUbuXc=",
"owner": "coffeeispower",
"repo": "woomer",
"rev": "a7a0b288f70b98d168eaa0e8714816d3583c33b1",
"type": "github"
},
"original": {
"owner": "coffeeispower",
"repo": "woomer",
"type": "github"
}
},
"wrappers": { "wrappers": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
@@ -822,6 +1004,28 @@
"type": "github" "type": "github"
} }
}, },
"wshowkeys": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1781708685,
"narHash": "sha256-NH5b736WoI9LodJKPlonO1X+Lxg8URMLLRkT5to61Zg=",
"owner": "voidarclabs",
"repo": "wshowkeys",
"rev": "47dfb7a0237acbf847ca28cbb88000b33929f50a",
"type": "github"
},
"original": {
"owner": "voidarclabs",
"repo": "wshowkeys",
"type": "github"
}
},
"xdph": { "xdph": {
"inputs": { "inputs": {
"hyprland-protocols": [ "hyprland-protocols": [

View File

@@ -7,7 +7,10 @@
# Apps # Apps
nvim.url = "git+https://git.voidarc.co.uk/voidarc/nvim"; nvim.url = "git+https://git.voidarc.co.uk/voidarc/nvim";
hyprland.url = "git+https://git.voidarc.co.uk/voidarc/hypr"; hyprland = {
url = "git+https://git.voidarc.co.uk/voidarc/hypr";
inputs.nixpkgs.follows = "nixpkgs";
};
otter-launcher = { otter-launcher = {
url = "github:kuokuo123/otter-launcher"; url = "github:kuokuo123/otter-launcher";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";

View File

@@ -3,12 +3,12 @@
inputs, inputs,
... ...
}: { }: {
flake.nixosModules.hypr = { flake.nixosModules.hyprland = {
pkgs, pkgs,
lib, lib,
... ...
}: { }: {
programs.hypr = { programs.hyprland = {
enable = true; enable = true;
package = self.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; package = self.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
}; };

View File

@@ -8,10 +8,20 @@
lib, lib,
... ...
}: { }: {
nixpkgs.overlays = [
(final: prev: {
zsh = self.packages.${pkgs.stdenv.hostPlatform.system}.myZsh;
})
];
programs.zsh = { programs.zsh = {
enable = true; enable = true;
package = self.packages.${pkgs.stdenv.hostPlatform.system}.myZsh; enableCompletion = true;
enableBashCompletion = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
histSize = 10000;
}; };
users.defaultUserShell = pkgs.zsh;
}; };
perSystem = { perSystem = {
pkgs, pkgs,
@@ -22,26 +32,30 @@
packages = { packages = {
myZsh = inputs.wrappers.wrappers.zsh.wrap { myZsh = inputs.wrappers.wrappers.zsh.wrap {
inherit pkgs; inherit pkgs;
runtimePkgs = [pkgs.carapace];
zshAliases = { zshAliases = {
ls = lib.getExe pkgs.lsd; ls = lib.getExe pkgs.lsd;
cat = lib.getExe pkgs.bat; cat = lib.getExe pkgs.bat;
lg = lib.getExe pkgs.lazygit; lg = lib.getExe pkgs.lazygit;
devenv = lib.getExe pkgs.devenv;
carapace = lib.getExe pkgs.carapace;
man = "man -P \"${lib.getExe pkgs.bat} -p\""; man = "man -P \"${lib.getExe pkgs.bat} -p\"";
nsh = "nix-shell -p"; nsh = "nix-shell -p";
}; };
zshrc.content = '' zshrc.content = ''
export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional autoload -U compinit && compinit
# export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional
zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m' zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m'
source <(${pkgs.carapace}/bin/carapace _carapace) source <(${lib.getExe pkgs.carapace} _carapace)
setopt NO_CASE_GLOB setopt NO_CASE_GLOB
zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
export EDITOR=nvim export EDITOR=nvim
eval "$(${pkgs.devenv}/bin/devenv hook zsh)" eval "$(${lib.getExe pkgs.devenv} hook zsh)"
eval "$(${self.packages.${pkgs.host.stdenv.hostPlatform.system}.ohMyPosh}/bin/oh-my-posh init zsh)" eval "$(${lib.getExe self.packages.${pkgs.host.stdenv.hostPlatform.system}.ohMyPosh} init zsh)"
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin ${lib.getExe pkgs.any-nix-shell} zsh --info-right | source /dev/stdin
''; '';
}; };
ohMyPosh = inputs.wrappers.wrappers.oh-my-posh.wrap { ohMyPosh = inputs.wrappers.wrappers.oh-my-posh.wrap {

View File

@@ -10,6 +10,8 @@
}: let }: let
modules = with self.nixosModules; [ modules = with self.nixosModules; [
userConfiguration userConfiguration
hyprland
zsh
]; ];
in { in {
imports = imports =
@@ -17,7 +19,13 @@
/etc/nixos/hardware-configuration.nix /etc/nixos/hardware-configuration.nix
] ]
++ modules; ++ modules;
nix.settings = {
programs.zsh.enable = true; cores = 6;
download-buffer-size = 524288000;
experimental-features = [
"nix-command"
"flakes"
];
};
}; };
} }