mirror of
https://github.com/cupcakearmy/nix-macos.git
synced 2025-09-03 17:30:39 +00:00
add nvs overlay
This commit is contained in:
1
cask.nix
1
cask.nix
@@ -31,6 +31,7 @@
|
||||
"zen"
|
||||
"bitwarden"
|
||||
"spotify"
|
||||
"tidal"
|
||||
"slack"
|
||||
"yubico-authenticator"
|
||||
"mediahuman-audio-converter"
|
||||
|
27
flake.nix
27
flake.nix
@@ -21,31 +21,6 @@
|
||||
let
|
||||
hosts = import ./hosts;
|
||||
inherit (builtins) listToAttrs;
|
||||
overlay = final: prev: {
|
||||
nvs = prev.buildGoModule rec {
|
||||
pname = "nvs";
|
||||
version = "1.10.5";
|
||||
|
||||
src = prev.fetchFromGitHub {
|
||||
owner = "y3owk1n";
|
||||
repo = pname;
|
||||
tag = "v${version}";
|
||||
sha256 = "sha256-Qp5c2F383Z0MxTtDt3wmLgxiAwfIJWupVDCePrBxNQI=";
|
||||
};
|
||||
|
||||
# # Add completion generation
|
||||
nativeBuildInputs = [ prev.installShellFiles ];
|
||||
postInstall = ''
|
||||
export HOME=$TMPDIR
|
||||
installShellCompletion --cmd nvs \
|
||||
--bash <($out/bin/nvs completion bash) \
|
||||
--fish <($out/bin/nvs completion fish) \
|
||||
--zsh <($out/bin/nvs completion zsh)
|
||||
'';
|
||||
|
||||
vendorHash = "sha256-l2FdnXA+vKVRekcIKt1R+MxppraTsmo0b/B7RNqnxjA=";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
darwinConfigurations = listToAttrs (
|
||||
@@ -58,7 +33,7 @@
|
||||
};
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.overlays = [ overlay ];
|
||||
nixpkgs.overlays = [ (import ./overlay.nix) ];
|
||||
}
|
||||
(import ./darwin.nix)
|
||||
home-manager.darwinModules.home-manager
|
||||
|
@@ -54,6 +54,7 @@
|
||||
px = "pnpm -s dlx";
|
||||
n = "fnm use --install-if-missing";
|
||||
c = "pwd | pbcopy";
|
||||
k = "kubectl";
|
||||
|
||||
vai = "sudo darwin-rebuild switch --flake ~/.config/nix-macos#${host.hostName}";
|
||||
};
|
||||
@@ -72,6 +73,9 @@
|
||||
if type -q fnm
|
||||
fnm env --use-on-cd | source
|
||||
end
|
||||
if type -q nvs
|
||||
nvs env --source | source
|
||||
end
|
||||
'';
|
||||
};
|
||||
bash = {
|
||||
|
@@ -42,6 +42,9 @@ with pkgs;
|
||||
lazydocker
|
||||
exercism
|
||||
posting
|
||||
terraform
|
||||
k9s
|
||||
kubectl
|
||||
|
||||
# Editor
|
||||
nvs
|
||||
|
27
overlay.nix
Normal file
27
overlay.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
final: prev: {
|
||||
nvs = prev.buildGoModule rec {
|
||||
pname = "nvs";
|
||||
version = "1.10.5";
|
||||
|
||||
src = prev.fetchFromGitHub {
|
||||
owner = "cupcakearmy";
|
||||
repo = pname;
|
||||
# tag = "v${version}";
|
||||
rev = "1700f2751e969b77b7f7ab3cc16a4e0f3955ce14";
|
||||
sha256 = "sha256-RScXYxkrfLJp1nAgN2YgSRC4mLGK4yXsYjGBrDR00b8=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-l2FdnXA+vKVRekcIKt1R+MxppraTsmo0b/B7RNqnxjA=";
|
||||
|
||||
# Completions
|
||||
nativeBuildInputs = [ prev.installShellFiles ];
|
||||
postInstall = ''
|
||||
export HOME=$TMPDIR
|
||||
installShellCompletion --cmd nvs \
|
||||
--bash <($out/bin/nvs completion bash) \
|
||||
--fish <($out/bin/nvs completion fish) \
|
||||
--zsh <($out/bin/nvs completion zsh)
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user