diff --git a/flake.lock b/flake.lock index 94c1a79f..6059b100 100644 --- a/flake.lock +++ b/flake.lock @@ -98,6 +98,24 @@ "type": "github" } }, + "devshell_2": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1741473158, + "narHash": "sha256-kWNaq6wQUbUMlPgw8Y+9/9wP0F8SHkjy24/mN3UAppg=", + "owner": "numtide", + "repo": "devshell", + "rev": "7c9e793ebe66bcba8292989a68c0419b737a22a0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "disko": { "inputs": { "nixpkgs": [ @@ -386,6 +404,22 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1722073938, + "narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e36e9f57337d0ff0cf77aceb58af4c805472bfae", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { "flake-parts": [ @@ -477,7 +511,7 @@ "vim-heritage": "vim-heritage", "vim-textobj-xmlattr": "vim-textobj-xmlattr", "voidrice": "voidrice", - "zet": "zet" + "z": "z" } }, "rwxrob-dot": { @@ -605,20 +639,28 @@ "type": "github" } }, - "zet": { - "flake": false, + "z": { + "inputs": { + "devshell": "devshell_2", + "flake-parts": [ + "flake-parts" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, "locked": { - "lastModified": 1759321843, - "narHash": "sha256-rtj3J5UYpjDRmZIirGocbHMk6ol7/ijCkqjO8MO3i3E=", + "lastModified": 1761343870, + "narHash": "sha256-qp0vpFJiRYZOCkezpYXB+f+Ytf1cLU7Ij28oxHdaeSs=", "ref": "refs/heads/main", - "rev": "665ef94ca97cf54a563e268cfcf5c447bfa6cef8", - "revCount": 62, + "rev": "f073b5e0f1c86f8760988be45cc7923d90037ddc", + "revCount": 95, "type": "git", - "url": "https://code.oliverdavies.uk/opdavies/cmd-zet" + "url": "https://code.oliverdavies.uk/opdavies/z" }, "original": { "type": "git", - "url": "https://code.oliverdavies.uk/opdavies/cmd-zet" + "url": "https://code.oliverdavies.uk/opdavies/z" } } }, diff --git a/flake.nix b/flake.nix index 49ca8b78..762f6fbe 100644 --- a/flake.nix +++ b/flake.nix @@ -88,9 +88,10 @@ url = "github:lukesmithxyz/voidrice"; }; - zet = { - flake = false; - url = "git+https://code.oliverdavies.uk/opdavies/cmd-zet"; + z = { + inputs.flake-parts.follows = "flake-parts"; + inputs.nixpkgs.follows = "nixpkgs"; + url = "git+https://code.oliverdavies.uk/opdavies/z"; }; }; diff --git a/modules/scripts/start-tmux.nix b/modules/scripts/start-tmux.nix index 316fdfc1..6383ac80 100644 --- a/modules/scripts/start-tmux.nix +++ b/modules/scripts/start-tmux.nix @@ -1,4 +1,4 @@ -{ withSystem, ... }: +{ inputs, withSystem, ... }: let name = "start-tmux"; @@ -10,9 +10,9 @@ in packages.${name} = pkgs.writeShellApplication { inherit name; - # TODO: Add `z` once its available as a package. runtimeInputs = with pkgs; [ fzf + inputs.z.packages.${pkgs.system}.default ]; text = '' diff --git a/modules/scripts/zet.nix b/modules/z.nix similarity index 53% rename from modules/scripts/zet.nix rename to modules/z.nix index 5c9a0bfc..4d32899a 100644 --- a/modules/scripts/zet.nix +++ b/modules/z.nix @@ -1,27 +1,13 @@ { inputs, withSystem, ... }: let - name = "zet"; + name = "z"; in { perSystem = { pkgs, ... }: { - packages.${name} = pkgs.buildGoModule { - inherit name; - - runtimeInputs = with pkgs; [ - git - ]; - - src = inputs.zet; - - vendorHash = "sha256-pprnK2JKmPuR3Q+F8+vMDEdowlb3oX4BOOzW8NGOqgs="; - - postInstall = '' - mv $out/bin/cmd-${name} $out/bin/${name} - ''; - }; + packages.${name} = inputs.${name}.packages.${pkgs.system}.default; }; flake.modules.homeManager.base = diff --git a/modules/zsh/aliases.nix b/modules/zsh/aliases.nix index e89f1515..1995f1c4 100644 --- a/modules/zsh/aliases.nix +++ b/modules/zsh/aliases.nix @@ -14,6 +14,7 @@ tag = "tag-release"; vss = "LC_ALL=C sort --unique ${config.xdg.userDirs.extraConfig.XDG_REPOS_DIR}/nixos-config/modules/home-manager/cli/neovim/config/spell/en.utf-8.adddotfiles/nvim/spell/en.utf-8.add --output ${config.xdg.userDirs.extraConfig.XDG_REPOS_DIR}/nixos-config/modules/home-manager/cli/neovim/config/spell/en.utf-8.add"; wt = "git worktree"; + zet = "z zet"; }; }; } diff --git a/modules/zsh/init.nix b/modules/zsh/init.nix index 3358758b..74ee2606 100644 --- a/modules/zsh/init.nix +++ b/modules/zsh/init.nix @@ -3,6 +3,9 @@ { config, pkgs, ... }: { programs.zsh.initContent = '' + # Completions + source <(z completion zsh) + background() { for ((i=2;i<=$#;i++)); do ''${@[1]} ''${@[$i]} &> /dev/null &