mirror of
https://github.com/cupcakearmy/nix-macos.git
synced 2025-09-05 18:30:39 +00:00
add nvs overlay
This commit is contained in:
1
cask.nix
1
cask.nix
@@ -31,6 +31,7 @@
|
|||||||
"zen"
|
"zen"
|
||||||
"bitwarden"
|
"bitwarden"
|
||||||
"spotify"
|
"spotify"
|
||||||
|
"tidal"
|
||||||
"slack"
|
"slack"
|
||||||
"yubico-authenticator"
|
"yubico-authenticator"
|
||||||
"mediahuman-audio-converter"
|
"mediahuman-audio-converter"
|
||||||
|
27
flake.nix
27
flake.nix
@@ -21,31 +21,6 @@
|
|||||||
let
|
let
|
||||||
hosts = import ./hosts;
|
hosts = import ./hosts;
|
||||||
inherit (builtins) listToAttrs;
|
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
|
in
|
||||||
{
|
{
|
||||||
darwinConfigurations = listToAttrs (
|
darwinConfigurations = listToAttrs (
|
||||||
@@ -58,7 +33,7 @@
|
|||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [ overlay ];
|
nixpkgs.overlays = [ (import ./overlay.nix) ];
|
||||||
}
|
}
|
||||||
(import ./darwin.nix)
|
(import ./darwin.nix)
|
||||||
home-manager.darwinModules.home-manager
|
home-manager.darwinModules.home-manager
|
||||||
|
@@ -54,6 +54,7 @@
|
|||||||
px = "pnpm -s dlx";
|
px = "pnpm -s dlx";
|
||||||
n = "fnm use --install-if-missing";
|
n = "fnm use --install-if-missing";
|
||||||
c = "pwd | pbcopy";
|
c = "pwd | pbcopy";
|
||||||
|
k = "kubectl";
|
||||||
|
|
||||||
vai = "sudo darwin-rebuild switch --flake ~/.config/nix-macos#${host.hostName}";
|
vai = "sudo darwin-rebuild switch --flake ~/.config/nix-macos#${host.hostName}";
|
||||||
};
|
};
|
||||||
@@ -72,6 +73,9 @@
|
|||||||
if type -q fnm
|
if type -q fnm
|
||||||
fnm env --use-on-cd | source
|
fnm env --use-on-cd | source
|
||||||
end
|
end
|
||||||
|
if type -q nvs
|
||||||
|
nvs env --source | source
|
||||||
|
end
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
bash = {
|
bash = {
|
||||||
|
@@ -42,6 +42,9 @@ with pkgs;
|
|||||||
lazydocker
|
lazydocker
|
||||||
exercism
|
exercism
|
||||||
posting
|
posting
|
||||||
|
terraform
|
||||||
|
k9s
|
||||||
|
kubectl
|
||||||
|
|
||||||
# Editor
|
# Editor
|
||||||
nvs
|
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