Add 1password-shell-plugins

This allows wiring up certain commands (such as `gh`, `tea`, `aws`, etc)
to get credentials from 1Password.
main
Bo Jeanes 2024-07-17 14:40:55 +10:00
parent 2d28fe7caf
commit 2745e6c515
No known key found for this signature in database
2 changed files with 46 additions and 0 deletions

View File

@ -1,5 +1,30 @@
{
"nodes": {
"_1password-shell-plugins": {
"inputs": {
"flake-utils": [
"nixvim",
"devshell",
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1716464653,
"narHash": "sha256-7ABtcvZf8P2axZNVV3m9LiKy1VW0lumu60sSuUOYG0o=",
"owner": "1Password",
"repo": "shell-plugins",
"rev": "d36189bf486ff2c4d9275c9ce29ec1aa92eaa4a7",
"type": "github"
},
"original": {
"owner": "1Password",
"repo": "shell-plugins",
"type": "github"
}
},
"devshell": {
"inputs": {
"flake-utils": "flake-utils",
@ -265,6 +290,7 @@
},
"root": {
"inputs": {
"_1password-shell-plugins": "_1password-shell-plugins",
"flake-parts": "flake-parts",
"home-manager": "home-manager",
"nix-darwin": "nix-darwin",

View File

@ -24,6 +24,13 @@
};
};
# https://developer.1password.com/docs/cli/shell-plugins/nix/
_1password-shell-plugins = {
url = "github:1Password/shell-plugins";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "nixvim/devshell/flake-utils";
};
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
@ -158,6 +165,7 @@
{
imports = [
inputs.nixvim.homeManagerModules.nixvim
inputs._1password-shell-plugins.hmModules.default
];
home.shellAliases = {
@ -305,6 +313,18 @@
];
};
programs._1password-shell-plugins = {
enable = true;
plugins = with pkgs; [
gh # github
cargo
heroku
tea # gitea
glab # gitlab
];
};
home.packages = with pkgs; [
# TODO: https://gist.github.com/axelbdt/0de9f5f9ba8a2100326b793f7bfb8658?permalink_comment_id=4977667#gistcomment-4977667
asdf-vm